scroll
Navigate within web pages by scrolling pixel distances, viewport pages, or to specific elements using CSS selectors in Chrome debugging sessions.
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 |
|---|---|---|---|
| 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. | |
| 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). | |
| 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. | |
| 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). |