Answer the question
In order to leave comments, you need to log in
How to print the value of a repr element in Python 3?
How to display the value of the repr element if a different element value is generated?
<selenium.webdriver.remote.webelement.WebElement (session="20e86134-70bd-48fc-93
fb-dea581db1ce9", element="{7620c0da-7136-4247-b017-070b938d2eee}")>
t = driver.find_element_by_xpath(".//*[@id='header']/div/nav/ul/li[5]/a")
print(t)
repr(t)
Answer the question
In order to leave comments, you need to log in
I didn't quite understand the question. Do you need link text? Try
t = driver.find_element_by_xpath(".//*[@id='header']/div/nav/ul/li[5]/a")
print (t.text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question