python+selenium使用Chromedriver驱动

    用python写selenium调用chrome时提示驱动错误,设置驱动的方式如下

    https://sites.google.com/a/chromium.org/chromedriver/getting-started

    1. include the ChromeDriver location in your PATH environment variable
    2. (Java only) specify its location via the webdriver.chrome.driver system property (see sample below)
    3. (Python only) include the path to ChromeDriver when instantiating webdriver.Chrome (see sample below)

    方法一(仅对python有效):

    方法二:

    将chromedriver移动到/usr/bin下

    如果还有问题的话,记得给chromedriver设置可执行权限

     

    转载请注明:软件测试 » python+selenium使用Chromedriver驱动

    喜欢 0