The protractor gives the message "Failed to start WebDriver session"

I already started the server with webdriver-manager start , but I get this error when I try to start the protractor:

 Using the selenium server at http://127.0.0.1:4444/wd/hub [launcher] Running 1 instances of WebDriver ERROR - Unable to start a WebDriver session. C:\...\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113 var template = new Error(this.message); ^ UnknownError: unknown error: cannot find Chrome binary 

My configuration file looks like this:

 exports.config = { specs: [ 'test/*.js' ], capabilities: { 'browserName': 'chrome' }, seleniumAddress: 'http://127.0.0.1:4444/wd/hub' }; 

I also tried pointing to the binary in the features object, and also adding the chromeDriver and seleniumServerJar keys to no avail. Any ideas?

+6
source share
1 answer

According to the actual github problem, the problem is that the chromedriver cannot find the chrome browser executeable - on different operating systems it searches for it in different places .

You need to either install chrome, where chromedriver expects it, or specify the path to the chrome executable in the binary setting:

 capabilities: { "browserName": "chrome", "chromeOptions": { binary: "D:/Program Files/Chrome/chrome.exe", args: [], extensions: [], } }, 
+9
source

Source: https://habr.com/ru/post/979664/


All Articles