Run Playwright code (unsafe)
browser_run_code_unsafeRun custom Python Playwright code for advanced browser automation. Execute arbitrary scripts in the server process when built-in actions are insufficient.
Instructions
Run a Python Playwright code snippet. Unsafe: executes arbitrary Python in the Playwright server process with normal builtins/imports and is RCE-equivalent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Python Playwright code to execute. It may define an async function or provide statements that run with page in scope. | |
| _meta | No | ||
| filename | No | Load code from the specified file. If both code and filename are provided, code will be ignored. |