import time
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('http://arithmetic.zetamac.com/game?key=a7220a92')
element = driver.find_element_by_link_text('problem')
print(element)
我发现了错误:
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
我不知道发生了什么,因为我已经进口了硒。
要么在webdriver.Chrome中提供ChromeDriver路径,要么提供path变量
在不更改代码eevn单行的情况下消除此异常的最佳方法是将chromedriver.exe(或其他浏览器驱动程序文件)添加到Python中
请检查这个解决方案,它有效。
相关问题 更多 >
编程相关推荐