Skip to main content
Glama

playwright_hover

Simulate mouse hover on a web element using its CSS selector for precise interaction, powered by Playwright and Chrome DevTools Protocol in browser automation tasks.

Instructions

Hover an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to hover

Implementation Reference

  • The main handler logic for the 'playwright_hover' tool. It waits for the specified selector to appear on the page and then hovers over it using Playwright's hover method. Returns success or error message accordingly.
    case "playwright_hover": try { await page!.waitForSelector(args.selector); await page!.hover(args.selector); return { content: [{ type: "text", text: `Hovered ${args.selector}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Failed to hover ${args.selector}: ${(error as Error).message}`, }], isError: true, }; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lars-hagen/mcp-playwright-cdp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server