Skip to content
Testing
Skill

/testdriver-hover

Hover over elements or coordinates

From plugin
testdriverai
35665 skills1 agent

Claude Code

$ npx -y skills add testdriverai/testdriverai --skill testdriver-hover --agent claude-code

SKILL.md

testdriver-hover.SKILL.md
name: testdriver:hover
description: Hover over elements or coordinates

<!-- Generated from hover.mdx. DO NOT EDIT. -->

Overview

Move the mouse cursor onto elements or coordinates without a click. Use this to show tooltips, dropdowns, and hover effects.

Element Hover

Put the cursor on a found element.

Syntax

await element.hover()

Returns

`Promise<void>`

Examples

// Find and hover
const tooltip = await testdriver.find('info icon');
await tooltip.hover();

// Wait to see tooltip
await new Promise(r => setTimeout(r, 1000));

// Hover over menu to reveal submenu
const menu = await testdriver.find('Products menu');
await menu.hover();

const submenu = await testdriver.find('Laptops submenu item');
await submenu.click();

Coordinate Hover

Put the cursor at screen coordinates.

Syntax

await testdriver.hover(x, y)

Parameters

<ParamField path="x" type="number" required> X coordinate </ParamField>

<ParamField path="y" type="number" required> Y coordinate </ParamField>

Returns

`Promise<void>`

Examples

// Hover at coordinates
await testdriver.hover(500, 300);

// Hover and wait
await testdriver.hover(500, 300);
await new Promise(r => setTimeout(r, 1000));

Best Practices

<Check> **Prefer element hover over coordinates**

  // ✅ Preferred
  const icon = await testdriver.find('info icon');
  await icon.hover();
  
  // ❌ Avoid
  await testdriver.hover(500, 300);

</Check>

<Check> **Wait after hovering for dynamic content**

  const menuItem = await testdriver.find('Settings menu');
  await menuItem.hover();
  
  // Wait for submenu to appear
  await new Promise(r => setTimeout(r, 500));
  
  const subItem = await testdriver.find('Profile submenu');
  await subItem.click();

</Check>

<Check> **Verify element was found before hovering**

  const element = await testdriver.find('tooltip trigger');
  if (!element.found()) {
    throw new Error('Element not found');
  }
  await element.hover();

</Check>

Use Cases

<AccordionGroup> <Accordion title="Tooltips">

    // Hover to show tooltip
    const icon = await testdriver.find('help icon');
    await icon.hover();
    
    await new Promise(r => setTimeout(r, 1000));
    
    // Read tooltip content
    const tooltipText = await testdriver.extract('the tooltip text');
    console.log('Tooltip:', tooltipText);

</Accordion>

<Accordion title="Dropdown Menus">

    // Hover to reveal dropdown
    const menuItem = await testdriver.find('Products menu item');
    await menuItem.hover();
    
    // Wait for dropdown animation
    await new Promise(r => setTimeout(r, 500));
    
    // Click submenu option
    const category = await testdriver.find('Electronics category');
    await category.click();

</Accordion>

<Accordion title="Image Previews">

    // Hover over thumbnail to see preview
    const thumbnail = await testdriver.find('product thumbnail');
    await thumbnail.hover();
    
    await new Promise(r => setTimeout(r, 800));
    
    // Verify preview appears
    await testdriver.assert('product preview is displayed');

</Accordion>

<Accordion title="Hover Effects">

    // Test hover state styling
    const button = await testdriver.find('call to action button');
    await button.hover();
    
    await new Promise(r => setTimeout(r, 500));
    
    // Verify hover effect
    await testdriver.assert('button background changed to blue');

</Accordion>

<Accordion title="Drag and Drop">

    // Use hover in drag and drop
    const item = await testdriver.find('draggable item');
    await item.mouseDown();
    
    // Hover over drop zone
    const dropZone = await testdriver.find('drop area');
    await dropZone.hover();
    
    await new Promise(r => setTimeout(r, 300));
    await dropZone.mouseUp();

</Accordion> </AccordionGroup>

Complete Example

import { beforeAll, afterAll, describe, it } from 'vitest';
import TestDriver from 'testdriverai';

describe('Hover 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 show tooltip on hover', async () => {
    await testdriver.focusApplication('Google Chrome');
    
    // Find and hover over icon
    const infoIcon = await testdriver.find('information icon');
    await infoIcon.hover();
    
    // Wait for tooltip to appear
    await new Promise(r => setTimeout(r, 1000));
    
    // Verify tooltip is visible
    await testdriver.assert('tooltip is displayed');
    
    // Extract tooltip text
    const tooltipText = await testdriver.extract('the tooltip message');
    console.log('Tooltip says:', tooltipText);
  });

  it('should navigate dropdown menu', async () => {
    // Hover over main menu
    const menu = await testdriver.find('Navigation menu');
    await menu.hover();
    
    // Wait for dropdown
    await new Promise(r => setTimeout(r, 500));
    
    // Hover over submenu item
    const submenu = await testdriver.find('Account submenu');
    await submenu.hover();
    
    await new Promise(r => setTimeout(r, 300));
    
    // Click nested menu item
    const settings = await testdriver.find('Settings option');
    await settings.click();
    
    await testdriver.assert('settings page is displayed');
  });

  it('should preview images on hover', async () => {
    // Hover over product image
    const productImg = await testdriver.find('product 1 thumbnail');
    await productImg.hover();
    
    // Wait for preview
    await new Promise(r => setTimeout(r, 800));
    
    // Verify previe
Read more
@testdriverai
Ships withtestdriverai

Computer-Use SDK for E2E QA Testing

35665 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
356
Star history of testdriverai/testdriverai on GitHub, a chart by star-history.com

Other skills on testdriverai.

More skills from other plugins.

api-review

api-review

Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…

@microsoft@microsoftInstall Skill
add-e2e-selectors

add-e2e-selectors

Add reliable @grafana/e2e-selectors to interactive elements and key containers in the Grafana frontend. Use when adding e2e…

grafana5d78k
@grafana@grafanaInstall Skill
promptfoo-evals

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…

promptfoo13d27k
@promptfoo@promptfooInstall Skill
deepeval

deepeval

DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…

@confident-ai@confident-aiInstall Skill

Questions about testdriver-hover.

Which coding agents can use testdriver-hover?
testdriver-hover installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.