navigate
Directs the WebDriverIO automation to load a specified webpage URL for browser testing or mobile app interaction.
Instructions
navigates to a URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to navigate to |
Implementation Reference
- src/tools/navigate.tool.ts:14-27 (handler)The main handler function for the 'navigate' tool.
export const navigateTool: ToolCallback = async ({ url}: { url: string }) => { try { const browser = getBrowser(); await browser.url(url); return { content: [{ type: 'text', text: `Navigated to ${url}` }], }; } catch (e) { return { isError: true, content: [{ type: 'text', text: `Error navigating: ${e}` }], }; } }; - src/tools/navigate.tool.ts:6-12 (schema)The schema definition for the 'navigate' tool.
export const navigateToolDefinition: ToolDefinition = { name: 'navigate', description: 'navigates to a URL', inputSchema: { url: z.string().min(1).describe('The URL to navigate to'), }, }; - src/server.ts:102-102 (registration)The registration of the 'navigate' tool in the server.
registerTool(navigateToolDefinition, withRecording('navigate', navigateTool));