goForward
Navigate forward to the next page in the browser history using PlayMCP's automation tool. Simplify web interactions and testing by moving ahead through visited pages.
Instructions
Navigate forward to the next page in history
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/controllers/playwright.ts:605-617 (handler)The main handler function that executes the goForward logic using Playwright's page.goForward() method, including error handling and logging.async goForward(): Promise<void> { try { if (!this.isInitialized() || !this.state.page) { throw new Error('Browser not initialized'); } this.log('Going forward'); await this.state.page.goForward(); this.log('Forward navigation complete'); } catch (error: any) { console.error('Go forward error:', error); throw new BrowserError('Failed to go forward', 'Check if there is a next page in history'); } }
- src/server.ts:260-268 (schema)Tool definition including name, description, and empty input schema for the goForward tool.const GO_FORWARD_TOOL: Tool = { name: "goForward", description: "Navigate forward to the next page in history", inputSchema: { type: "object", properties: {}, required: [] } };
- src/server.ts:788-793 (registration)Registers and dispatches the goForward tool call to the Playwright controller in the MCP server's callTool handler.case 'goForward': { await playwrightController.goForward(); return { content: [{ type: "text", text: "Navigated forward successfully" }] }; }
- src/server.ts:535-535 (registration)Registers the GO_FORWARD_TOOL in the server's tools capabilities object.goForward: GO_FORWARD_TOOL,