Pochi
Pochi

Reputation: 45

Get text from <strong> Selenium (Python)

I would like to get the text which is after the < strong > (in this case "1. 95183645") into a variable with Selenium.

enter image description here

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

Answers (1)

ble
ble

Reputation: 287

driver.find_element_by_xpath("//table[@id='backupcodes_table']//strong").text

Upvotes: 3

Related Questions