testdriver:click
FreeNo executable scriptsNot checkedClick at specific coordinates or on elements
by testdriverai★ 342 GitHub starsAbout this skill
Element Click
When called on an Element object, clicks on the located element.
Syntax
await element.click(action)
Parameters
Returns
Promise<void>
Examples
// Regular click
const button = await testdriver.find('submit button');
await button.click();
// Double-click
const file = await testdriver.find('README.txt file');
await file.click('double-click');
// Right-click
const item = await testdriver.find('menu item');
await item.click('right-click');
// Hover (same as element.hover())
const tooltip = await testdriver.find('info icon');
await button.click('hover');
Coordinate Click
Click at specific screen coordinates.
Syntax
await testdriver.click(x, y, action)
Parameters
Returns
Promise<void>
Examples
// Click at coordinates
await testdriver.click(500, 300);
// Double-click at coordinates
await testdriver.click(500, 300, 'double-click');
// Right-click at coordinates
await testdriver.click(500, 300, 'right-click');
Click Actions
Regular Click
Single left-click action.
const button = await testdriver.find('Login button');
await button.click();
Double Click
Double-click action, commonly used to open files or select text.
const file = await testdriver.find('document.pdf');
await file.click('double-click');
// Or use the dedicated method
await file.doubleClick();
Right Click
Right-click to open context menus.
const folder = await testdriver.find('Documents folder');
await folder.click('right-click');
// Or use the dedicated method
await folder.rightClick();
Mouse Down / Mouse Up
For drag operations or custom click behavior.
const draggable = await testdriver.find('draggable item');
await draggable.click('mouseDown');
// Move to target
const dropZone = await testdriver.find('drop zone');
await dropZone.hover();
await dropZone.click('mouseUp');
// Or use dedicated methods
await draggable.mouseDown();
await dropZone.mouseUp();
Best Practices
Element-based clicking is more reliable and resolution-independent:
// ✅ Preferred
const button = await testdriver.find('submit button');
await button.click();
// ❌ Avoid (fragile)
await testdriver.click(500, 300);
const element = await testdriver.find('button');
if (!element.found()) {
throw new Error('Element not found');
}
await element.click();
The find() method automatically locates elements, but clicking an element that wasn't found will throw an error:
const element = await testdriver.find('button');
// This will throw if element wasn't found
await element.click();
Use Cases
const cancelBtn = await testdriver.find('cancel button');
await cancelBtn.click();
```
// Select menu option
const deleteOption = await testdriver.find('Delete option');
await deleteOption.click();
```
const target = await testdriver.find('target zone');
await target.hover();
await target.mouseUp();
```
Complete Example
import { beforeAll, afterAll, describe, it } from 'vitest';
import TestDriver from 'testdriverai';
describe('Click Interactions', () => {
let testdriver;
beforeAll(async () => {
client = new TestDriver(process.env.TD_API_KEY);
await testdriver.auth();
await testdriver.connect();
});
afterAll(async () => {
await testdriver.disconnect();
}
Install testdriver:click in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the testdriver:click skill do?
Click at specific coordinates or on elements
How do I install the testdriver:click skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the testdriver:click skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic