python selenium look for tag containing text code example
Example 1: how to locate element by using text
The only locator that works with text is xpath.
Matching exact text : //tag[.=‘text’]
Matching partial text : //tag[contains(text(), ’text’)]
Example 2: how to get text of a tag in selenium python
element.text