Skip to content

web_drag

Drag a web element and drop it somewhere else. The source is identified like web_click (element ID such as ‘e5’, an ARIA descriptor such as ‘button “Table 1”’, or ‘css=…’). Drop either on another element (dropRef, with optional dropOffsetX/dropOffsetY measured from that element’s top-left corner) or on an absolute viewport point (x, y). Use this for canvas editors, sortable lists, sliders, and anything else that needs a real press-move-release.

Source

  • Kind: class-backed
  • Class: xyz.block.trailblaze.playwright.tools.PlaywrightNativeDragTool

Contract

  • Visible to LLM: yes (surface_to_llm: true)
  • Recordable: yes (is_recordable: true)
  • Host-only: no (requires_host: false)

Input schema

Optional parameters

  • ref — String Source element to drag: element ID (e.g., ‘e5’), ARIA descriptor (e.g., ‘button “Table 1”’), or CSS selector with css= prefix.
  • dropRef — String Element to drop onto: ARIA descriptor (e.g., ‘button “Table 1”’) or CSS selector with css= prefix. Snapshot element IDs such as ‘e5’ are NOT accepted here — they are positional and would not replay. Omit to drop at the viewport point (x, y).
  • dropOffsetX — Integer Horizontal drop offset in pixels from the target element’s left edge. Defaults to its center.
  • dropOffsetY — Integer Vertical drop offset in pixels from the target element’s top edge. Defaults to its center.
  • x — Integer Absolute viewport x to drop at, when no dropRef is given.
  • y — Integer Absolute viewport y to drop at, when no dropRef is given.
  • reasoning — String

Output

Returns: string (opaque text content)

Typed result schemas (kind: query | action, MCP structuredContent) are not yet carried by the resolved manifest — this section will gain detail when that lands.