首页 > 解决方案 > Python Selenium 不点击无法定位的链接

问题描述

这是网站: http: //money.finance.sina.com.cn/bond/quotes/sh175694.html

我试过了:

driver.find_element_by_xpath('//div[@class="title tit06"]/a').click()

或者

driver.find_element_by_xpath('(//a[@class="more more_links"])[1]').click()

两者都不起作用并返回:没有这样的元素:无法找到元素:

任何帮助将不胜感激!

谢谢!

这里还有更多:

url = 'http://biz.finance.sina.com.cn/suggest/lookup_n.php?country=&q=%09175708'
driver.get(url)
driver.implicitly_wait(10)
driver.find_element_by_xpath('(//div[@class="list"])[2]/label/a').click()   
driver.implicitly_wait(10)
driver.find_element_by_xpath('//div[@class="title tit06"]/a').click()

标签: pythonseleniumxpath

解决方案


推荐阅读