execute-code
Run custom Playwright JS code on a web page to interact, extract data, or retrieve logs and errors. Ideal for automating browser tasks and testing in a structured environment.
Instructions
Execute custom Playwright JS code against the current page
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | The Playwright code to execute. Must be an async function declaration that takes a page parameter. Example: async function run(page) { console.log(await page.title()); return await page.title(); } Returns an object with: - result: The return value from your function - logs: Array of console logs from execution - errors: Array of any errors encountered Example response: {"result": "Google", "logs": ["[log] Google"], "errors": []} |