Reputation: 45
I would like to get the text which is after the < strong > (in this case "1. 95183645") into a variable with Selenium.
I've already tried with:
driver.find_element_by_xpath("xpath").text
driver.find_element_by_xpath("xpath").text()
driver.find_element_by_xpath("xpath").getText
driver.find_element_by_xpath("xpath").getText()
but nothing seems to work.
Thanks
Upvotes: 0
Views: 1716
Reputation: 287
driver.find_element_by_xpath("//table[@id='backupcodes_table']//strong").text
Upvotes: 3