focus_on
Scroll to, focus, or highlight an element without clicking or typing. Use it to bring elements into view, prepare for keyboard input, or visually verify elements during debugging.
Instructions
Scroll to, focus, or highlight an element.
Use this tool when an element needs to be brought into view, focused for keyboard interaction, or highlighted for debugging/demonstration.
This tool does NOT click, type into, select from, hover over, or otherwise activate the element.
Args: selector: CSS selector or SeleniumBase selector identifying the target.
action:
- "scroll_to_element": Scroll the page until the element is in
the current viewport. This is the default action.
- "focus": Move keyboard focus to the element.
- "highlight": Temporarily highlight the element for debugging or
demonstration. This can affect timing and may reduce stealth.Tool selection: - Bring an element into view -> use focus_on with the default action. - Focus an element -> use focus_on(action="focus"). - Highlight element for debugging -> use focus_on(action="highlight"). - Click -> use click. - Type text into a text field -> use type_text. - Hover -> use hover_with_action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | scroll_to_element | |
| selector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |