Click at specific coordinates or on elements
npx skills add https://github.com/testdriverai/testdriverai --skill testdriver:click
<!-- Generated from click.mdx. DO NOT EDIT. -->
When called on an Element object, clicks on the located element.
await element.click(action)
<ParamField path="action" type="string" default="click">
Type of click action: 'click', 'double-click', 'right-click', 'hover', 'mouseDown', 'mouseUp'
</ParamField>
Promise<void>
// 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');
Click at specific screen coordinates.
await testdriver.click(x, y, action)
<ParamField path="x" type="number" required>
X coordinate
</ParamField>
<ParamField path="y" type="number" required>
Y coordinate
</ParamField>
<ParamField path="action" type="string" default="click">
Type of click: 'click', 'double-click', 'right-click', 'mouseDown', 'mouseUp'
</ParamField>
Promise<void>
// 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');
Single left-click action.
const button = await testdriver.find('Login button');
await button.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 to open context menus.
const folder = await testdriver.find('Documents folder');
await folder.click('right-click');
// Or use the dedicated method
await folder.rightClick();
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();
<Check>
Prefer element clicks over coordinate clicks
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);
</Check>
<Check>
Verify element was found
const element = await testdriver.find('button');
if (!element.found()) {
throw new Error('Element not found');
}
await element.click();
</Check>
<Warning>
Element must be found before clicking
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();
</Warning>
<AccordionGroup>
<Accordion title="Button Clicks">
const submitBtn = await testdriver.find('submit button');
await submitBtn.click();
const cancelBtn = await testdriver.find('cancel button');
await cancelBtn.click();
</Accordion>
<Accordion title="Opening Files">
const file = await testdriver.find('report.pdf file icon');
await file.doubleClick();
</Accordion>
<Accordion title="Context Menus">
const item = await testdriver.find('file item');
await item.rightClick();
// Select menu option
const deleteOption = await testdriver.find('Delete option');
await deleteOption.click();
</Accordion>
<Accordion title="Drag and Drop">
const source = await testdriver.find('source item');
await source.mouseDown();
const target = await testdriver.find('target zone');
await target.hover();
await target.mouseUp();
</Accordion>
</AccordionGroup>
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();
});
it('should perform various click actions', async () => {
await testdriver.focusApplication('Google Chrome');
// Regular click
const loginBtn = await testdriver.find('login button');
await loginBtn.click();
// Right-click for context menu
const profileIcon = await testdriver.find('profile icon');
await profileIcon.rightClick();
const settingsOption = await testdriver.find('Settings menu option');
await settingsOption.click();
// Double-click to edit
const nameField = await testdriver.find('name display field');
await nameField.doubleClick();
// Verify state
await testdriver.assert('name field is now editable');
});
it('should perform drag and drop', async () => {
const item = await testdriver.find('draggable item');
await item.mouseDown();
// Drag to new location
const dropTarget = await testdriver.find('drop area');
await dropTarget.hover();
await dropTarget.mouseUp();
// Verify
await testdriver.assert('item is in the drop area');
});
});
find() - Locate elements to clickhover() - Hover without clickingdoubleClick() - Dedicated double-click methodrightClick() - Dedicated right-click methodToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.
Automate Anchor Browser tasks via Rube MCP (Composio). Always search tools first for current schemas.
Automate Browser Tool tasks via Rube MCP (Composio). Always search tools first for current schemas.
Get Image [from] Internet Link - Zero-setup CLI for downloading full-resolution images from iCloud, Dropbox, Google Photos, and Google Drive share links. Four-tier capture strategy, browser automation, HEIC conversion, album support. Node.js/Playwright.
Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions. Covers extension architecture, manifest v3, content scripts, popup UIs, monetization strategies, and Chrome Web Store publishing. Use when: browser extension, chrome extension, firefox addon, extension, manifest v3.
Take testdriverai/testdriver:click from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.