AI-Powered UI Automation of an E‑Commerce Checkout Flow with TestHub Agent Browser Skill
This article walks through importing the TestHub Agent Browser Skill, running two AI‑driven UI test cases—creating a new version number and completing a full e‑commerce purchase of a MacBook Air—while highlighting practical tips, model choices, and the regression value of such basic workflows.
Importing the Agent Browser Skill
The Hermes module and digital‑person configuration are assumed to be set up; the Agent Browser Skill zip is downloaded from the TestHub VIP Skills repository and imported into the TestHub platform.
Executing Test Tasks
Case 1: New Version Number Flow
The test scenario validates TestHub's version‑creation process. The task description sent to the agent is:
使用agent-browser skill,帮我完成以下内容的自动化测试(有头模式):
1. 访问 http://localhost:3000,使用账号testadmin、密码admin123456进行登录;
2. 打开“AI用例生成”页面,切换到新打开的标签页,进入版本管理,点击“新建版本”按钮
3. 在新建版本弹框中填写以下信息:
● 版本名称输入“V8.0”+当前时间戳;
● 点开关联项目下拉框,选择下拉选项中的第一条,
● 版本描述填写"这是 Browser Use 填写的版本号描述"
4. 点击“保存”按钮,提交创建;
5. 验证版本管理列表第一条是否为新增的版本号。Key notes: specify the skill and headless mode, and use a strong multimodal model such as Kimi‑2.6. The execution succeeded in a single run, and the newly created version "V8.01786110889" was verified on the UI.
Case 2: E‑Commerce Checkout Flow
The second scenario automates purchasing a MacBook Air on a demo e‑commerce site. The manual steps are described first, then the AI prompt sent to TestHub:
调用agent-browser skill,使用有头模式,帮我完成以下内容的自动化测试:
1. 访问 http://localhost:5175/
2. 使用账号15252162668、密码123456登录;
3. 点击电脑类目
4. 点击查看“MacBook Air 13 M3 16G (新款)”详情
5. 选择16G+512G、银色,立即购买
6. 提交订单并支付The AI execution completed smoothly, as shown in the accompanying screenshots, confirming that the login, product browsing, and order submission steps work correctly.
Key Takeaways
Explicitly emphasize special commands such as the skill name and head‑mode.
Provide clear, step‑by‑step task descriptions that mirror manual operations.
Prefer a multimodal model with strong overall capability (e.g., Kimi‑2.6) for reliable AI execution.
TestHub + Skill can be leveraged for test case generation, test plan creation, mobile app testing, automatic bug reporting, and more.
Final Thoughts
Even simple login or basic checkout scenarios are valuable for regression testing because they can quickly reveal critical system failures, as illustrated by a real incident where a login‑test caught a disk‑full crash. Effective UI automation combines solid AI prompting with thorough coverage of fundamental business flows.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
