I am trying to select a button by text that looks like this:
<button>
<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
</svg>
The button
</button>
I am trying to utilize the find_element API:
browser.find_element(By.XPATH,'//button[text()="The button"]')
I believe it is because of the svg element in there, but I am not sure.
I would like to be able to make assertions like this without the need for unique selectors (id or similar).