Paragrphe element .getText() not a function

I iterated inside a div children contain paragrahe element, and I try to console log text.getText() of each paragrahe but I got :
Uncaught (in promise) TypeError: textEl.getText is not a function

The text is accessed by fetching the paragraph’s child element - instead, fetch the children paragraphEl.getChildren() and you’ll see there’s a single element of StringElement type. You can then use childElement.getText() to get the value

1 Like