scroll
Scroll a page by pixel offset, viewport pages, or to a specific element using a CSS selector. Navigate long pages or bring elements into view.
Instructions
Scrolls the page by pixel offset, viewport pages, or to a specific element using CSS selector. Side effects: modifies DOM scroll position (observable but reversible). Prerequisites: requires an active Chrome tab with content. Returns: scroll completion confirmation. Use this to navigate within long pages or bring elements into view. Alternatives: 'click_element' to trigger scroll by clicking, 'evaluate_js' for custom scroll logic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Horizontal scroll distance in pixels. Constraints: integer (positive=right, negative=left). Interactions: ignored if 'selector' is provided; combined with 'y' for diagonal scrolling. Defaults to: 0 (no horizontal scroll). | |
| y | No | Vertical scroll distance in pixels. Constraints: integer (positive=down, negative=up). Interactions: ignored if 'selector' or 'pages' is provided; overridden by 'pages'. Defaults to: 0 (no vertical scroll). | |
| pages | No | Number of viewport heights to scroll vertically. Constraints: positive float (e.g., 1.5 = 1.5× viewport height). Interactions: takes precedence over 'y' parameter if both provided; ignored if 'selector' provided. Defaults to: None. | |
| selector | No | CSS selector of element to scroll into view. Constraints: valid CSS selector string. Interactions: takes precedence over 'x', 'y', 'pages' if provided; fails if element not found. Defaults to: None. |