go_back
Navigate one step back in browser history using Selenium. This tool simulates the browser's back button, enabling automated return to the previous page in test scripts.
Instructions
Navigate one step back in browser history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/selenium_mcp_server/server.py:65-68 (handler)The 'go_back' MCP tool handler function. Defined with @mcp.tool() decorator, it calls browser.back() via the _run helper to navigate one step back in browser history.
@mcp.tool() def go_back() -> dict[str, Any]: """Navigate one step back in browser history.""" return _run("go_back", browser.back) - The BrowserManager.back() method that executes the actual browser back navigation by calling driver.back() on the Selenium WebDriver and returns the current browser state.
def back(self) -> BrowserState: with self._lock: self._require_driver().back() return self.state() - src/selenium_mcp_server/server.py:65-65 (registration)The go_back tool is registered as an MCP tool via the @mcp.tool() decorator on line 65.
@mcp.tool() - No input parameters are defined for go_back (no schema needed); it returns a dict[str, Any] (the browser state).
def go_back() -> dict[str, Any]: