Protractor in STS IDE -> Could not find update-config.json

喜夏-厌秋 提交于 2019-11-29 01:10:36

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.

You can try to update it like this, it will definitely update it in node_modules/protractor :

$ ./node_modules/protractor/bin/webdriver-manager update

Just execute webdriver-manager with npx command in your project folder;

npx webdriver-manager update

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

Siddhartha Thota

You just need to run this command and it fixes it - npm run webdriver-update it updates you webdriver in node_modules section under node_modules/protractor.

These 2 lines are the main culprits. Just try running that command and it should fix your issue.

[22:21:48] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[22:21:48] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.

Hope that helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!