Skip to navigation

Element criteria

Wait for a specific element to be present. At least one finding field must be specified.

Referenced In

Fields

FieldTypeDescriptionDefault
selectorstringOptional. Selector for the element to wait for. On browser surfaces, a CSS selector. On app surfaces, a native selector — an XPath (//), or ~ for an accessibility id; CSS is rejected at runtime.—
elementTextstringOptional. Text content the element must contain. Supports exact match or regex pattern using /pattern/ syntax.—
elementIdstringOptional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.—
elementTestIdstringOptional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.—
elementClassone of:
- string
- array of string
Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes.—
elementAttributeobjectOptional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.—
elementAriastringOptional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax.—

Examples

{
"selector": "example",
"elementText": "example",
"elementId": "example",
"elementTestId": "example",
"elementClass": "example",
"elementAttribute": {},
"elementAria": "example"
}