Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

testdriver:click

БесплатноБез исполняемых скриптовНе проверен

Click at specific coordinates or on elements

testdriveraiот testdriverai★ 342 звезды на GitHub

Об этом скилле

Element Click

When you call this on an Element object, it clicks on the found element.

Syntax

await element.click(action)

Parameters

Type of click action: `'click'`, `'double-click'`, `'right-click'`, `'hover'`, `'mouseDown'`, `'mouseUp'`

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

X coordinate Y coordinate Type of click: `'click'`, `'double-click'`, `'right-click'`, `'mouseDown'`, `'mouseUp'`

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

One left-click action.

const button = await testdriver.find('Login button');
await button.click();

Double Click

A double-click action. It usually opens files or selects 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

Use these 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

**Prefer element clicks to coordinate clicks**

A click on an element is more reliable. It does not depend on the resolution:

// ✅ Preferred
const button = await testdriver.find('submit button');
await button.click();

// ❌ Avoid (fragile)
await testdriver.click(500, 300);
**Make sure that TestDriver found the element**
const element = await testdriver.find('button');
if (!element.found()) {
  throw new Error('Element not found');
}
await element.click();
**TestDriver must find the element before you click it**

The find() method finds elements automatically. But a click on an element that TestDriver did not find throws an error:

const element = await testdriver.find('button');
// This will throw if element wasn't found
await element.click();

Use Cases

```javascript const submitBtn = await testdriver.find('submit button'); await submitBtn.click();
const cancelBtn = await testdriver.find('cancel button');
await cancelBtn.click();
```
```javascript const file = await testdriver.find('report.pdf file icon'); await file.doubleClick(); ``` ```javascript const item = await testdriver.find('file item'); await item.rightClick();
// Select menu option
const deleteOption = await testdriver.find('Delete option');
await deleteOption.click();
```
```javascript const source = await testdriver.find('source item'); await source.mouseDown();
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();
  });
Полный SKILL.md на GitHub

Установить testdriver:click в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл testdriver:click?

Click at specific coordinates or on elements

Как установить скилл testdriver:click?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл testdriver:click запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить testdriver:click с