SessionNotCreatedError: Unable to create new service: ChromeDriverService

后端 未结 4 2027
忘了有多久
忘了有多久 2020-12-16 01:17

We have AngularJS protractor tests. The process is to set up and run these steps in order:

$ npm install
$ webdriver-manager update --ie32 --ignore_ssl
$ gul         


        
4条回答
  •  不知归路
    2020-12-16 01:47

    This can be fixed by updating to the latest version of both chromedriver and chrome.

    If you are using webdriver-manager, run

    webdriver-manager update --chromedriver
    

    Then download Chrome from https://www.google.com/chrome/browser/desktop/ and replace your old chrome with the latest version.

    You will also need to Ctrl-C in the terminal where webdriver is running and run

    webdriver-manager start
    

    Or kill and restart the Selenium daemon process to capture the latest chromedriver. A system restart might be helpful.

    Also worth trying:

    npm update -g protractor
    webdriver-manager update
    

    Also see session not created exception for chrome in Protractor for more details on how to modify the version of Chromedriver in protractor's config

    Lastly, make sure that your protractor.conf.js has

       commonCapabilities: {
         'browserName': 'chrome',
       },
    

    or else you should be using

    --browser chrome
    

    flag on your protractor command

提交回复
热议问题