@atomic-testing/component-driver-html

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

HTML component driver for atomic-testing

原始使用文档
文档目录3 节
  1. Installation
  2. Public API & stability
  3. Capability interfaces

@atomic-testing/component-driver-html

Component drivers for standard HTML elements. Use these drivers to interact with the DOM when writing Atomic Testing scenes.

Fastest start: npm create atomic-testing@latest scaffolds a working test setup, HTML drivers included.

Installation

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

For usage examples see the documentation.

Public API & stability

The stable surface of this package is its . barrel exports, frozen under SemVer and machine-checked by the committed API Extractor report at etc/component-driver-html.api.md. Exports tagged @internal are not part of that guarantee. See the 1.0 API freeze & evolution policy.

Capability interfaces

These HTML drivers are the reference implementations of the core capability interfaces — each interface below is demonstrated by at least one driver, so the contract is exercised rather than aspirational. HTMLTextInputDriver implements the full form-control set and is the canonical exemplar.

Capability interfaceMethodExemplar driver
IInputDriver<T>get/setValueHTMLTextInputDriver
IClickableDriverclickHTMLButtonDriver
IToggleDriveris/setSelectedHTMLCheckboxDriver
IDisableableDriverisDisabledHTMLButtonDriver
IReadonlyableDriverisReadonlyHTMLTextInputDriver
IRequirableDriverisRequiredHTMLTextInputDriver
IValidatableDriverisErrorHTMLTextInputDriver

IDisableableDriver is also implemented by HTMLCheckboxDriver, HTMLSelectDriver and HTMLRangeInputDriver; IReadonlyableDriver by those same three input drivers.

版本与发布记录

@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 component driver for atomic-testing

如何安装 @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 和提交记录判断。