I know there's a way using xpath and javascript
element = browser.find_element_by_xpath("//*[contains(text(),'text')]")
but this method doesn't detect elements/tags, that are defined just as tags, eg:
<p>
<span class="text-primary">UK</span>
+44 (0) 1865 987 667<br>
Piccadilly Gardens, 49 Piccadilly, Manchester, M1 2AP </p>
In this case, if the text is +44 (0) 1865 987,it does not get the element.
- This issue is repetitive in many examples, that incorporates the text this way. What could be the reason?
- Is there a way to get the tag, searching using text, in beautifulsoup?
