I have the following three buttons that I can’t figure out how to grab the text that is inside of them (e.g Outliers). I tried
browser.find_element_by_link_text("Outliers").click(), but got “Unable to locate element” error. How can I do it?
In newer versions of selenium try:
from selenium.webdriver.common.by import By browser.find_element(By.XPATH, '//button[text()="Outliers"]')
older versions of selenium:
To update ALL of the older versions I found a nifty regex here, and then just fixup the import:
Answered By – jmunsch