I know it's possible in selenium, to find a specific element by a text that the element contains. I have an example code for this:
the_element = browser.find_element_by_xpath("//span[contains(.,TEXT)]")
Now is that possible to do with only javascript? There are ways in javascript to find an element by it's selector, but does it work to find an element by a specific text that it contains?
The element I'm working with is this:
<span class="_7Cm1F9 ka2E9k uMhVZi dgII7d z-oVg8 pVrzNP">28</span>
I want to find the element by the number (28) that it contains.
If somebody knows how to that, that would be awesome.