I am getting this error:
[01:10:42] E/launcher - The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
[01:10:42] E/launcher - WebDriverError: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
I need to set the webdriver.chrome.driver
property, but I can't find any docs on how to do this with Protractor, does anyone know?
If I had this to my protractor.conf.js:
chrome:{
driver: process.env.CDT_CHROMEDRIVER || '/usr/local/bin/chromedriver'
},
then I get this error:
unknown error: no chrome binary at /usr/bin/google-chrome
Any of these steps should do the trick: include the ChromeDriver location in your PATH environment variable. (Java only) specify its location via the webdriver.chrome.driver system property (see sample below) (Python only) include the path to ChromeDriver when instantiating webdriver.Chrome (see sample below)
Initially, you need to set the path to the chromedriver.exe file using set property method since you are using Chrome Browser for testing. You need to set the path to CRX File to add extensions method. Then you need to create an object of Chrome Desired Capabilities in Selenium class and pass it to web driver instance.
Run sudo npm install -g protractor, and then start your webdriver server, last step do "sudo webdriver-manager update". Now you should be able to invoke your browser :) Save this answer.
WebDriverManager is an open-source Java library that carries out the management (i.e., download, setup, and maintenance) of the drivers required by Selenium WebDriver (e.g., chromedriver, geckodriver, msedgedriver, etc.) in a fully automated manner.
Case 1 When you set DirectConnet to true in protractor conf file
Option 1: set in protractor conf file
exports.config = {
chromeDriver: './node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver'
};
Note: If use relative path, it relatived to the config file folder
Option 2: pass-in in protractor command line, it will overwrite the one in conf file.
protractor conf.js --chromeDriver='./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver'
Note: If use relative path, it relative to the foler where command executed under, calculated by process.cwd()
Case 2 When you set selenuimAddress to local/remote selenium server
Option 1: use npm package webdriver-manager
to help to update and start selenium server, it can calculate the webdriver path automatically, no need you to tell where is.
Option 2: start selenium server by java command and specify
-Dwebdriver.chrome.driver=absolute path of chromedriver
Case 3 When you set seleniumAddress to selenium grid
the only chance you can specify webdriver.chrome.driver
is when execute register cmd to register selenium node to selenium hub, you can't do anything in other place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With