Skip to main content
The Get Elements command (Command Type: 8) retrieves specified DOM elements from the web page and returns their detailed representations (including attributes, children, and text content).

Command Type

Command Type ID: 8

Parameters

ParameterTypeDescriptionRequired
elementsLocatorElementsLocatorSpecifies the criteria to locate target elementsYes
timeoutnumberTimeout in millisecondsYes

ElementsLocator

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

Usage Examples

Get All Table Rows

{
  "command": "get-elements",
  "params": {
    "elementsLocator": { "selector": "table.data tr" },
    "timeout": 10000
  }
}