Playwright icon

Playwright

Automate browser tasks with Playwright and optional CDP connection

Browser → Hover

AI-generated

Summary

Hover over a specified element on a web page using a CSS selector within a browser session managed by Playwright, optionally opening a URL first and specifying browser connection details.

Inputs

  • Connection Mode (required) — Choose how Playwright connects to the browser: launching a new browser instance or connecting over the Chrome DevTools Protocol (CDP).
  • Browser Type — Select browser type to launch: Chromium, Firefox, or WebKit (shown only if launching browser).
  • Headless — Run browser in headless mode without opening a visible window (shown only if launching browser).
  • CDP Endpoint — Specify the CDP endpoint URL to connect to an existing Chrome instance (shown only if connecting via CDP).
  • Timeout (MS) (required) — Maximum time to wait for browser actions to complete, in milliseconds.
  • Session ID — Identifier to reuse the same browser session and page in subsequent nodes.
  • Use Existing Tab — Option to reuse an already open tab when connecting over CDP.
  • Tab Index — Zero-based index of the tab to reuse when 'Use Existing Tab' is enabled (CDP mode).
  • Block Resource Types — Resource types to abort loading in order to optimize bandwidth, applied only when a new page is created.
  • Block URL Patterns — Comma-separated URL patterns to block from loading, applied only when a new page is created.
  • Additional Data — Optional JSON data to include in the node's output.
  • Target URL — URL to navigate to before performing the hover action (not used if operation is 'navigate' or 'runScript').
  • Selector (required) — CSS selector string identifying the element to hover over.
  • After Execution (required) — Determines whether to close the browser, close the current page/tab, or keep both open after the operation completes.

Output shape

a list of JSON objects, one per input item, each containing operation metadata and execution results

Each output item includes the selector hovered, current page URL, indication of success, connection mode, session details, optional additional data, and timestamp. The browser/page closing behavior depends on the 'After Execution' setting. Errors produce output items with error messages if 'Continue On Fail' is enabled.

Examples

Example 1: Hover over a submit button on a target website in a new Chromium browser launched headlessly

Launch mode with Chromium headless, Target URL set to the page, Selector set to '#submit', After Execution set to close browser. Timeout defaults to 30000 ms.

Links

Discussion