asked 1 year ago
To verify the expected text is present in the label/paragraph the text needs to be retrieved to compare with the actual text.
getText() method is used to get the text of the element.
Navigate to https://www.qafeast.com/demo,click the Label menu.
Press F12 on the keyboard and inspect the Label.
Syntax:
Example:
Output: Test automation