scroll-to-element
Scrolls in a specified direction until a designated element becomes visible, supporting various selector strategies and a customizable maximum number of scroll attempts.
Instructions
Scroll until an element becomes visible
Input Schema
Name | Required | Description | Default |
---|---|---|---|
direction | No | Direction to scroll (default: down) | |
maxScrolls | No | Maximum number of scroll attempts (default: 10) | |
selector | Yes | Element selector to scroll to (e.g., xpath) | |
strategy | No | Selector strategy: xpath, id, accessibility id, class name (default: xpath) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"direction": {
"description": "Direction to scroll (default: down)",
"enum": [
"up",
"down",
"left",
"right"
],
"type": "string"
},
"maxScrolls": {
"description": "Maximum number of scroll attempts (default: 10)",
"type": "number"
},
"selector": {
"description": "Element selector to scroll to (e.g., xpath)",
"type": "string"
},
"strategy": {
"description": "Selector strategy: xpath, id, accessibility id, class name (default: xpath)",
"type": "string"
}
},
"required": [
"selector"
],
"type": "object"
}