SessionNotCreatedError: Unable to create new service: ChromeDriverService

后端 未结 4 2021
忘了有多久
忘了有多久 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

    0 讨论(0)
  • 2020-12-16 02:01

    If you set the below in your config you can download the latest chromedriver.exe and run it directly with the below code. Only geckoDriver and chromeDriver work with directConnect.

    directConnect: true,
    chromeDriver: 'path_to_chromedriver',
    geckoDriver: 'path_to_geckodriver.exe',
    
    0 讨论(0)
  • 2020-12-16 02:03
    • Run webdriver-manager start
    • Open any browser manually, than navigate to 'localhost:4444/wd/hub' , click Create Session -> Chrome.
    0 讨论(0)
  • 2020-12-16 02:03

    I faced the same issue. Just install or update the protractor. If you still installed the protractor also Do the following steps, run the following in cmd prompt or PowerShell

    npm install protractor -g 
    
    npm install webdriver-manager -g
    

    If you got the error as running in the background, check the running processor and close all the running processor and try.

    After the above steps run the following

    webdriver-manager update
    webdriver-manager start
    
    0 讨论(0)
提交回复
热议问题