我试图单击此页中使用硒的webdriver在Python 3中的链接:使用Python +硒点击雅虎财经的链接
https://finance.yahoo.com/quote/GOOG?ltr=1
url = 'https://finance.yahoo.com/quote/GOOG?ltr=1'
display = Display(visible=0,size=(600,800))
display.start()
driver = webdriver.Firefox()
driver.get(url)
driver.find_element_by_link_text('Statistics')
上面的代码没有按不能使用显示的两行,并且抛出关于无法点击元素的错误。但是,如果我将它们评论出来,它确实有用。
可能的重复http://stackoverflow.com/questions/20485360/selenium-with-pyvirtualdisplay-unable-to-locate-element –