Currently I have Protractor v.5.1.1, Node.js v.6.10.0
All protractor tests work in window console but when I try to run them from STS IDE I get below error. Of cours
In my case
npm run webdriver-manager update
updates only app\node_modules\webdriver-manager
and not app\node_modules\protractor\node_modules\webdriver-manager\
. No matter if I run that command directly from console or as package.json script.
I had to run
npx webdriver-manager update
inside app\node_modules\protractor\node_modules\webdriver-manager\
.
Another solution would be this script:
"postinstall": "node ./node_modules/protractor/node_modules/webdriver-manager update"
It looks like you are either using directConnect
or launching with a local
driver provider (not having seleniumAddress
or directConnect
) in your configuration file. You need to run webdriver-manager update
.
Previously I had extra flags to not download standalone or gecko with webdriver-manager update --standalone false --gecko false
. This is no longer the case if you are starting via a local driver provider. You will need the selenium standalone jar file.
You could run this with a script in package.json. Something like:
"scripts": {
"webdriver-update": "webdriver-manager update"
}
Then execute this with: npm run webdriver-update
. How do you check if the binaries are there? In your project, navigate to node_modules/protractor/node_modules/webdriver-manager/selenium/
. This is where the update-config.json
and your downloaded binaries are located.
With this I am able to proceed further node node_modules/protractor/bin/webdriver-manager update
When I installed Java and updated Java Path in Windows 10, the problem was resolved.
On MacOS, I resolved this error by adding the seleniumAddress to my Protractor config file (I was previously using directConnect, so commented that out):
// directConnect: true,
// baseUrl: 'http://localhost:4000/',
seleniumAddress: 'http://localhost:4444/wd/hub/',
I now start Protractor server by running: $ webdriver-manager start
And in a different terminal window, I start tests with: $ ng e2e
Just execute webdriver-manager with npx command in your project folder;
npx webdriver-manager update