使用splinter, chromedriver 放在当前目录是可以找到的. 放在其他目录就找不到了. 设置系统路径也不行. 报错如下:
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解决方法:
增加 executable_path 参数即可:
from splinter import Browser
browser = Browser(driver_name='chrome', executable_path='../chromedriver')