Skip to main content

find

Find an element based on display text or a selector, then optionally interact with it.

Fields

FieldTypeDescriptionDefault
elementTextstringOptional. Display text of the element to find. If combined with selector, the element must match both the text and the selector.
selectorstringOptional. Selector of the element to find. If combined with elementText, the element must match both the text and the selector.
timeoutintegerOptional. Max duration in milliseconds to wait for the element to exist.5000
moveTobooleanOptional. Move to the element. If the element isn't visible, it's scrolled into view.true
clickOne of
- object(click)
- object
Optional. Click the element.
typeundefinedOptional. Type keys after finding the element. Either a string or an object with a keys field as defined in type. To type in the element, make the element active with the click parameter.

Examples

"Find me!"
{
"selector": "[title=Search]"
}
{
"selector": "[title=Search]",
"timeout": 10000,
"elementText": "Search",
"moveTo": true,
"click": true,
"type": "shorthair cat"
}
{
"selector": "[title=Search]",
"click": {
"button": "right"
}
}
{
"selector": "[title=Search]",
"timeout": 10000,
"elementText": "Search",
"moveTo": true,
"click": true,
"type": {
"keys": [
"shorthair cat"
],
"inputDelay": 100
}
}