browser_evaluate
Execute JavaScript code directly in a web page's context to retrieve data like page titles, URLs, element counts, or storage contents for web automation and testing.
Instructions
Execute JavaScript in the page context and return the result.
Examples:
"document.title"
"window.location.href"
"document.querySelectorAll('a').length"
"JSON.stringify(localStorage)"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code to execute in the page context |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |