TestDriver ai() Natural-Language Test Runner
A reference skill for using TestDriver's ai() method to drive UI test steps with plain-English instructions.
Dev & CodingIntermediate★ 238⑂ 35AI score 6/10Last updated: Aug 12, 2026
What it does
- Documents the testdriverai SDK's
ai(task, options)method: parameters, return value, and thevalidateAndLoopoption for self-verifying retries. - Helps you write tests like "Click the submit button" or "Complete the checkout process" where the AI analyzes the screen and plans the steps itself.
- Gives clear guidance on when to reach for
ai()versus explicit methods such asfind(),assert(), andextract(). - Includes a full vitest E2E example covering auth → connect → scenario → disconnect.
Who it's for
- QA engineers and frontend developers already writing UI automation with TestDriver.
- Anyone prototyping tests quickly or exploring an unfamiliar app without hand-writing selectors.
- Prerequisites: the
testdriveraipackage plus aTD_API_KEY; of little value outside TestDriver projects.
Examples
- Shopping flow:
await testdriver.ai('Search for "laptop", add the first result to cart, and proceed to checkout'), then verify the total withextract(). - Optional UI:
await testdriver.ai('Accept the cookie consent if it appears')to gracefully handle popups that may or may not show. - Validated checkout:
ai('Proceed to checkout and fill in shipping details', { validateAndLoop: true })followed by an explicitassert('order confirmation page is displayed').
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/testdriverai/testdriverai/HEAD/ai/skills/testdriver-ai/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the ai/skills/testdriver-ai folder from the GitHub repo testdriverai/testdriverai into my ~/.claude/skills/testdriver-ai/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai && mkdir -p ~/.claude/skills && cp -r /tmp/testdriverai/ai/skills/testdriver-ai ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Clone the repo:
git clone https://github.com/testdriverai/testdriverai.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r testdriverai/ai/skills/testdriver-ai ~/.claude/skills/ - Install the SDK in your test project:
npm i -D testdriverai vitest - Export your key:
export TD_API_KEY=your_key_here - Restart Claude Code and ask something like "write a login test using testdriver.ai()" so the skill gets picked up.