I\'m having trouble locating a span element in Selenium using java.
the HTML looks like:
For the element below
Test Text
The following solution works for me
driver.find_element_by_xpath("//span[contains(@class, 'test-button__text') and text()='Test Text']")