executeScript
Execute arbitrary JavaScript in the browser to handle edge cases that specialized automation tools cannot address. Use only after exhausting standard interactions.
Instructions
⚠️ LAST RESORT tool - use ONLY when ALL specialized tools failed. NEVER use for: clicking (use click), typing (use type), scrolling (use scrollTo), reading page elements (use analyzePage), finding elements (use findElementsByText), fetching API data (use listNetworkRequests + getNetworkRequest). May break React/Vue/Angular synthetic events. ALWAYS try specialized tools first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code | |
| timeout | No | Max wait ms (default: 30000) | |
| waitAfter | No | Wait ms (default: 500) | |
| screenshot | No | Screenshot (default: false) |