Skip to main content
The Get Inner Texts command (Command Type: 9) retrieves the visible innerText of specified DOM elements. Unlike textContent, innerText is aware of styling and only returns text that is rendered on screen. See: MDN HTMLElement.innerText

Command Type

Command Type ID: 9

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 Button Labels

{
  "command": "get-inner-texts",
  "params": {
    "elementsLocator": { "selector": "button.tab" },
    "timeout": 10000
  }
}