Skip to main content

getElementText

Retrieves the visible text of an element.

note

To retrieve text for elements whose text can be updated but doesn't reflect in html markup use getElementValue. Example of these elements are input[type='text'], input[type='button'], input[type='submit'], textarea.

getElementText(elemId)

Parameters#

  • elemId: The target element

Returns#

  • visible text of the element