← ClaudeAtlas

testdriverscrolllisted

Scroll pages and elements
testdriverai/testdriverai · ★ 243 · Testing & QA · score 72
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from scroll.mdx. DO NOT EDIT. --> ## Overview Scroll the page or the active element in any direction with the mouse wheel or the keyboard. <Warning> **Focus Requirements** A scroll needs focus on the page or on a frame. If an input field or another interactive element has focus, scroll commands can fail. Before you scroll, put the focus on the page: - Click a non-interactive area (for example, the page background) - Push the Escape key to remove the focus from interactive elements - Click outside of input fields or text areas **If the scroll still does not work**, use the Page Down or Page Up keys directly: ```javascript await testdriver.pressKeys(['pagedown']); // Scroll down await testdriver.pressKeys(['pageup']); // Scroll up ``` </Warning> ## Syntax ```javascript await testdriver.scroll(direction, options) ``` ## Parameters <ParamField path="direction" type="string" default="down"> Direction to scroll: `'up'`, `'down'` </ParamField> <ParamField path="options" type="object"> <Expandable title="properties"> <ParamField path="amount" type="number" default="300"> Amount to scroll in pixels </ParamField> </Expandable> </ParamField> ## Returns `Promise<void>` ## Examples ### Basic Scrolling ```javascript // Scroll down (default) await testdriver.scroll(); // Scroll down 5 clicks await testdriver.scroll('down', { amount: 5 }); // Scroll up await testdriver.scroll('up'); // Scroll up 2 clicks await tes