Skip to main content
The Wait For DOM Element command (Command Type: 6) waits until specific DOM elements appear in the browser, using an ElementsLocator to define the target.

Command Type

Command Type ID: 6

Parameters

ParameterTypeDescriptionRequired
elementsLocatorElementsLocatorDefines how to locate the target elementsYes
timeoutnumberTimeout for the command in millisecondsYes

ElementsLocator

FieldTypeDescriptionRequired
selectorstringCSS selectorYes
continueWithElementsLocatorContinue search within found elementNo
hasChildrenElementsLocatorFilter elements that have matching childrenNo
indexnumberSelect element by indexNo
innerTextstringFilter by inner textNo

Usage Examples

Wait for a Loading Indicator to Disappear

{
  "command": "wait-for-dom-element",
  "params": {
    "elementsLocator": { "selector": ".data-loaded" },
    "timeout": 15000
  }
}

Wait for a Specific Item

{
  "command": "wait-for-dom-element",
  "params": {
    "elementsLocator": {
      "selector": ".match-row",
      "innerText": "Football"
    },
    "timeout": 20000
  }
}