testdriver-agent
How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
Press the mouse button without releasing it
Claude Code
$ npx -y skills add testdriverai/testdriverai --skill testdriver-mouse-down --agent claude-code
Codex
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a codex -y
Cursor
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a cursor -y
Gemini CLI
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a gemini-cli -y
GitHub Copilot
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a github-copilot -y
OpenCode
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a opencode -y
Windsurf
$ npx skills add testdriverai/testdriverai --skill testdriver-mouse-down -a windsurf -y
name: testdriver:mouse-down description: Press the mouse button without releasing it
<!-- Generated from mouse-down.mdx. DO NOT EDIT. -->
The `mouseDown()` method pushes the mouse button at the location of an element. It does not release the button. Use this for drag operations, custom gestures, or when you need precise control of the mouse events. You can call it on an [`Element`](/core-concepts/elements) instance. Or you can use it with a selector.
// Mouse down on an element
await element.mouseDown();
// Mouse down using a selector
await ai.mouseDown('selector');When called on an `Element`, no parameters are required.
When called directly on the AI client:
| Parameter | Type | Description | |-----------|------|-------------| | `selector` | `string` | The selector describing the element where the mouse button should be pressed |
It returns a `Promise<void>`. The promise resolves when TestDriver pushes the mouse button.
// Start dragging an item
const dragItem = await ai.find('file to drag');
await dragItem.mouseDown();
// Move to drop target
const dropTarget = await ai.find('folder to drop into');
await dropTarget.hover();
// Release
await ai.mouseUp();await ai.mouseDown('draggable card');
await ai.hover('drop zone');
await ai.mouseUp();import { test } from 'vitest';
import { chrome } from '@testdriver/sdk';
test('selects multiple items with click and drag', async () => {
const { ai } = await chrome('https://app.example.com');
// Start selection at first item
await ai.mouseDown('first item in grid');
// Drag to last item
await ai.hover('last item in grid');
// Release to complete selection
await ai.mouseUp();
// Verify multiple items selected
const selectedItems = await ai.find('selected items count');
expect(selectedItems.text).toContain('5 items selected');
});test('draws on canvas', async () => {
const { ai } = await chrome('https://drawing-app.example.com');
// Start drawing
await ai.mouseDown('canvas at top-left corner');
// Draw a line by moving mouse
await ai.hover('canvas at center');
await ai.hover('canvas at bottom-right corner');
// Stop drawing
await ai.mouseUp();
// Verify something was drawn
const canvas = await ai.exec('document.querySelector("canvas").toDataURL()');
expect(canvas).toBeTruthy();
});test('triggers long press menu', async () => {
const { ai } = await chrome('https://mobile-app.example.com');
// Press and hold
await ai.mouseDown('message in chat');
// Wait for long-press menu
await new Promise(resolve => setTimeout(resolve, 500));
// Verify menu appeared before releasing
const menu = await ai.find('message options menu');
expect(menu).toBeTruthy();
// Release
await ai.mouseUp();
});test('resizes panel', async () => {
const { ai } = await vscode();
// Grab resize handle
await ai.mouseDown('sidebar resize handle');
// Drag to new position
await ai.hover('position 300 pixels from left edge');
// Release
await ai.mouseUp();
// Verify new size
const sidebar = await ai.find('sidebar');
expect(sidebar.width).toBeGreaterThan(250);
});How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
Deploy TestDriver on your AWS infrastructure using CloudFormation
How TestDriver learns your app and caches what it discovers for instant, deterministic replays
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…
DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…