protractor/selenium “could not find chromedriver at” (on Windows)

前端 未结 14 1798
感动是毒
感动是毒 2021-01-30 12:45

I installed protractor following this tutorial and when i use webdriver-manager update it says:

selenium standalone is up to date.
chromedriver is up to date.
         


        
14条回答
  •  时光说笑
    2021-01-30 13:46

    The Chrome driver can exist in any location, but the protractor runner seems to expect it to be in the location where it would exist if you installed it through "webdriver-manager". Thus, it can be installed with "npm install chromedriver", which will place it in a different location, such as: /usr/local/lib/node_modules/chromedriver/lib/chromedriver/chromedriver

    In this case, the config file will need to be set to look in this location, but there is likelt a simpler solution...

    If webdriver-manager fails to download either the chromedriver or selenium-standalone, there will be 0-byte files in the default location, which will cause this error. Unfortunately, this can happen with proxy related issues. Once the corrupt files are there, the update check process thinks everything is up-to-date, but it's not.

    Also, the proxy configuration for webdriver-manager is different than npm. For webdriver-manager, the syntax to do an update would be:

    sudo webdriver-manager update --proxy=http:///
    

    Clearing out the 0-byte files and re-running this update command should replace the files with their correct data. The location on my machine for these files is:

    /usr/local/lib/node_modules/protractor/selenium
    

提交回复
热议问题