Skip to main content
Glama
webdriverio

WebDriverIO MCP Server

Official

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
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • 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}` }],
        };
      }
    };
  • 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));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/webdriverio/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server