browser_scroll_to_bottom
Scroll to the bottom of a webpage to load dynamic content or access elements at the end of the page during browser automation.
Instructions
Scroll to the bottom of the page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/actionTools.ts:302-320 (handler)MCP tool registration and handler for 'browser_scroll_to_bottom'. Creates an ActionService instance and calls its scrollToBottom method, with standard try-catch error handling returning markdown content.server.tool('browser_scroll_to_bottom', 'Scroll to the bottom of the page', {}, async () => { try { const driver = stateManager.getDriver(); const actionService = new ActionService(driver); await actionService.scrollToBottom(); return { content: [{ type: 'text', text: `Scrolled to bottom of the page` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error scrolling to bottom: ${(e as Error).message}`, }, ], }; } });
- src/services/actionService.ts:79-81 (helper)Core implementation of scrolling to the bottom of the page using Selenium WebDriver's executeScript to run 'window.scrollTo(0, document.body.scrollHeight)'. Called by the tool handler.async scrollToBottom(): Promise<void> { await this.driver.executeScript('window.scrollTo(0, document.body.scrollHeight);'); }
- src/tools/index.ts:11-11 (registration)Top-level registration call for action tools, including browser_scroll_to_bottom, in the tools index file.registerActionTools(server, stateManager);