Issue
Here is my HTML and trying to get the text must be unique. with Python 2.7
Tried to use:
driver.find_element_by_xpath("//span[@id='lblError']/text()")
The xpath was not valid one.
Solution
enter code here
time.sleep(1)
enter code here
element = driver.find_element_by_xpath("//span[@id='lblError']")
enter code here
text = element.text
Answered By - Ari N
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.