scroll_down
Scrolls down a webpage by one viewport height using the Chrome Debug MCP Server, enabling precise browser automation and navigation.
Instructions
向下滚动页面一个视口高度
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/browserSession.ts:507-511 (handler)The scrollDown method implements the core logic for the 'scroll_down' tool by invoking doAction with scrollPage for downward scrolling.async scrollDown(): Promise<BrowserActionResult> { return this.doAction(async (page) => { await this.scrollPage(page, "down"); }); }
- src/browserSession.ts:490-502 (helper)Supporting method scrollPage that performs the actual page scrolling using window.scrollBy based on direction.private async scrollPage(page: Page, direction: "up" | "down"): Promise<void> { const { height } = this.getViewport(); const scrollAmount = direction === "down" ? height : -height; await page.evaluate((scrollHeight) => { window.scrollBy({ top: scrollHeight, behavior: "auto", }); }, scrollAmount); await delay(300); }
- src/index.ts:111-117 (schema)Schema definition for the scroll_down tool, indicating no required input parameters.name: "scroll_down", description: "向下滚动页面一个视口高度", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:203-205 (registration)Registration and dispatch logic in the tool request handler switch statement that invokes the scrollDown method.case "scroll_down": result = await this.browserSession.scrollDown(); break;