首页 新闻 搜索 专区 学院

请问出现下面的是什么情况呢?是没找到这个元素吗?

0
[待解决问题]

D:\pydemo>python htq.py
Traceback (most recent call last):
File "htq.py", line 16, in <module>
driver.find_element_by_xpath(".//*[@id='mCSB_1_container']/ul/li[1]/dl/dd[1]
/a").click()
File "D:\gongju\lib\site-packages\selenium\webdriver\remote\webdriver.py", lin
e 313, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "D:\gongju\lib\site-packages\selenium\webdriver\remote\webdriver.py", lin
e 791, in find_element
'value': value})['value']
File "D:\gongju\lib\site-packages\selenium\webdriver\remote\webdriver.py", lin
e 256, in execute
self.error_handler.check_response(response)
File "D:\gongju\lib\site-packages\selenium\webdriver\remote\errorhandler.py",
line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Una
ble to locate element: {"method":"xpath","selector":".//*[@id='mCSB_1_container'
]/ul/li[1]/dl/dd[1]/a"}
(Session info: chrome=59.0.3071.115)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cf
d9),platform=Windows NT 6.1.7601 SP1 x86_64)

风芷的主页 风芷 | 菜鸟二级 | 园豆:212
提问于:2017-07-21 17:34
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册