browser_highlight
Visually highlight an element on the page with a colored border and background overlay. Useful for debugging element selection - verify which element will be clicked before performing actions. The highlight persists until the page is navigated or refreshed.
Usage Example
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
selectorstringrequiredCSS selector or natural language description of the element to highlight. Useful for debugging element selection before clicking. Examples: '#submit', '.nav-item', 'the login button'
Optional
border_colorstringCSS color for the highlight border. Default: '#FF0000' (red). Examples: 'blue', '#00FF00', 'rgb(255, 128, 0)'
background_colorstringCSS color for the highlight background (use alpha for transparency). Default: 'rgba(255, 0, 0, 0.2)'. Examples: 'rgba(0, 255, 0, 0.3)', 'transparent'
indexstringWhen multiple elements match the selector, highlight the Nth element (0-based). Default: -1 (first match)
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}