playwright_go_back
Navigate back in browser history during automated testing to verify page transitions and user flow functionality.
Instructions
Navigate back in browser history
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "playwright_go_back"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/browser/navigation.ts:94-104 (handler)The GoBackTool.execute method implements the core logic for the playwright_go_back tool by calling page.goBack() on the Playwright page instance.
export class GoBackTool extends BrowserToolBase { /** * Execute the go back tool */ async execute(_args: any, context: ToolContext): Promise<ToolResponse> { return this.safeExecute(context, async (page) => { await page.goBack(); return createSuccessResponse("Navigated back in browser history"); }); } } - src/tools.ts:412-420 (schema)Input schema definition for the playwright_go_back tool, specifying no required parameters.
{ name: "playwright_go_back", description: "Navigate back in browser history", inputSchema: { type: "object", properties: {}, required: [], }, }, - src/toolHandler.ts:641-642 (registration)Registration in the main tool handler switch statement that dispatches calls to the GoBackTool instance.
case "playwright_go_back": return await goBackTool.execute(args, context); - src/toolHandler.ts:414-414 (registration)Instantiation of the GoBackTool class instance used for handling tool calls.
if (!goBackTool) goBackTool = new GoBackTool(server); - src/toolHandler.ts:33-33 (registration)Import of the GoBackTool from its implementation file.
import { GoBackTool, GoForwardTool } from "./tools/browser/navigation.js";