Drag
dragSimulate a real mouse press, move, and release between two selectors or viewport coordinates to operate sliders, sortable lists, canvases, and native HTML5 interactions.
Instructions
Drag with a real mouse: press at the start, move in steps, release at the end. Each end is a selector (its center) or x and y in viewport pixels. Works for sliders, sortable lists, canvases, and native HTML5 drag and drop (reported as nativeDrag true). Needs the DevTools engine. Top-level page only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_x | No | End x in viewport pixels, instead of to_selector | |
| to_y | No | End y in viewport pixels, instead of to_selector | |
| steps | No | Intermediate mouse moves between start and end | |
| from_x | No | Start x in viewport pixels, instead of from_selector | |
| from_y | No | Start y in viewport pixels, instead of from_selector | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. | |
| to_nth | No | Which to_selector match to use, 0-based | |
| from_nth | No | Which from_selector match to use, 0-based | |
| to_selector | No | Element to release on. CSS selector, "text=Label", or ref=, role=, label=, placeholder= as in click. | |
| from_selector | No | Element to press on. CSS selector, "text=Label", or ref=, role=, label=, placeholder= as in click. |