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

后端 未结 8 460
我寻月下人不归
我寻月下人不归 2020-12-09 08:06

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

相关标签:
8条回答
  • 2020-12-09 08:30

    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"
    
    0 讨论(0)
  • 2020-12-09 08:32

    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.

    0 讨论(0)
  • 2020-12-09 08:32

    With this I am able to proceed further node node_modules/protractor/bin/webdriver-manager update

    0 讨论(0)
  • 2020-12-09 08:33

    When I installed Java and updated Java Path in Windows 10, the problem was resolved.

    0 讨论(0)
  • 2020-12-09 08:37

    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

    0 讨论(0)
  • 2020-12-09 08:40

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

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