open-new-page
Open a new browser page within AdsPower profiles to manage multiple browsing sessions for testing and automation tasks.
Instructions
Open a new page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/automation.ts:17-22 (handler)The core handler function for the 'open-new-page' tool. It checks if the browser is connected, creates a new page in the current context using Puppeteer, sets it as the current page instance, and returns a success message.async openNewPage() { browser.checkConnected(); const newPage = await browser.pageInstance!.context().newPage(); browser.pageInstance = newPage; return `New page opened successfully`; },
- src/types/schemas.ts:164-164 (schema)The schema used for the 'open-new-page' tool, which is an empty object schema indicating no input parameters are required.emptySchema: z.object({}).strict(),
- src/utils/toolRegister.ts:53-54 (registration)Registers the 'open-new-page' tool with the MCP server, providing the tool name, description, input schema, and the wrapped handler function.server.tool('open-new-page', 'Open a new page', schemas.emptySchema.shape, wrapHandler(automationHandlers.openNewPage));