@atomic-testing/component-driver-html

中文文档
0.104.0发布于 2026/08/20MITTypeScriptESM + CJS构建来源已验证近 30 天下载 1.6万

原子测试的 HTML 组件驱动程序

中文使用文档
文档目录3 节
  1. 安装
  2. 公共 API 稳定性
  3. 能力接口

@ 原子测试/ 组件- 司机- html

标准 HTML 元素的组件驱动 . 使用这些驱动程序在撰写"原子测试场景"时与DOM交互.

最快的开始 : npm create atomic-testing@latest 脚手架是一个工作测试设置,包括了HTML驱动程序.

安装

pnpm add @atomic-testing/component-driver-html

关于使用实例,请参见 文档。 。 。 .

公共 API 稳定性

这个包的稳定表面是它的 . 桶出口,在 由被害者进行机器检查 API 提取器 报告 etc/component-driver-html.api.md。标记的出口 @internal 为: 不是保证的一部分。 见 1.0 API 冻结和演变政策。 。 。 .

能力接口

这些 HTML 驱动程序是核心能力的引用执行 接口——下面的每个接口至少用一个驱动程序显示,所以 合同是行使而不是抱负性的. HTMLTextInputDriver 执行 完整的形式控制集,是犬科的范例.

能力接口方法实例驱动程序
IInputDriver<T>get/setValueHTMLTextInputDriver
IClickableDriverclickHTMLButtonDriver
IToggleDriveris/setSelectedHTMLCheckboxDriver
IDisableableDriverisDisabledHTMLButtonDriver
IReadonlyableDriverisReadonlyHTMLTextInputDriver
IRequirableDriverisRequiredHTMLTextInputDriver
IValidatableDriverisErrorHTMLTextInputDriver

IDisableableDriver 也由 HTMLCheckboxDriver, (中文(简体) ), HTMLSelectDriver 财务报告和审定财务报表 HTMLRangeInputDriver· ; IReadonlyableDriver 由相同的三个输入驱动器.

版本与发布记录

@atomic-testing/component-driver-html 共发布 101 个版本,首次发布于 2023/03/08;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.104.0latest2026/08/202 个月前
0.103.02026/08/182 个月前
0.102.02026/08/172 个月前
0.101.02026/08/073 个月前
0.100.02026/08/023 个月前
0.99.02026/07/223 个月前

关于 @atomic-testing/component-driver-html 的常见问题

@atomic-testing/component-driver-html 是什么?

原子测试的 HTML 组件驱动程序

如何安装 @atomic-testing/component-driver-html?

在项目目录运行 npm install @atomic-testing/component-driver-html,或使用 pnpm add / yarn add / bun add。

@atomic-testing/component-driver-html 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@atomic-testing/component-driver-html 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@atomic-testing/component-driver-html 可以商用吗?

@atomic-testing/component-driver-html 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@atomic-testing/component-driver-html 的下载量有多少?

根据 npm 官方下载统计,@atomic-testing/component-driver-html 在 2026/10/07 – 2026/11/05 这 30 天内被下载 16,315 次,日均约 544 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@atomic-testing/component-driver-html 还在维护吗?

最新版本 0.104.0 发布于 2026/08/20(2 个月前);至今共发布 101 个版本,其中过去 12 个月发布了 23 个;首次发布于 2023/03/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。