为什么打印会话id而不是元素路径?

2024-06-07 14:25:33 发布

您现在位置:Python中文网/ 问答频道 /正文

代码:

FindComment = browser.find_element_by_xpath("//*[contains(text(), 'commented')]").parent
print(FindComment)

输出:

<selenium.webdriver.firefox.webdriver.WebDriver (session="99sf9sfjSIFSf-f9sf(JSFsfsfs")>

不知道为什么它会打印这个。我希望它打印实际的元素路径


Tags: 代码textbrowserbyseleniumelementfindfirefox

热门问题