Reputation: 69
this is email i want to show:
this is my Code :
getemail = driver.find_element_by_xpath(".//b[contains(text(), '@')]").text
print(getemail)
and it showed nothing. Thank you for help!
Upvotes: 1
Views: 51
Reputation: 106
It would be easier to find that information by using the ID instead.
email = driver.find_element_by_id("email_ch_text").text
Upvotes: 3
Reputation: 1938
The xpath is not accurate. try this,
getemail = driver.find_element_by_xpath(".//b/span[contains(text(), '@')]").text
print(getemail)
Upvotes: 0