1

this is email i want to show:

enter image description here

this is my Code :

getemail = driver.find_element_by_xpath(".//b[contains(text(), '@')]").text
print(getemail)

and it showed nothing. Thank you for help!

1

2 Answers 2

3

It would be easier to find that information by using the ID instead.

email = driver.find_element_by_id("email_ch_text").text
Sign up to request clarification or add additional context in comments.

1 Comment

This is a question about python, why reference Javascript?
0

The xpath is not accurate. try this,

getemail = driver.find_element_by_xpath(".//b/span[contains(text(), '@')]").text
print(getemail)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.