【发布时间】:2016-04-03 21:47:36
【问题描述】:
我正在尝试单击以下页面上的“查看更多结果”按钮:http://www.chadbourne.com/search/people?az[b]=b
我的代码是直截了当的,我已经尝试了多次迭代。
driver = driver.Firefox()
driver.get("http://www.chadbourne.com/search/people?az[b]=b")
element = driver.find_element_by_partial_link_text("View more results")
或
element = driver.find_element_by_partial_link_text("view")
或
element = driver.find_element_by_partial_link_text("results")
无论我尝试上述哪个选项,我都会收到 NoSuchElementException。
这很奇怪,因为页面上明显存在该元素:
<a href="/search/people?s=&az[b]=b&&&&&&&&page=1">View more results</a>
有什么想法吗?
【问题讨论】: