1

We are running e2e tests within corporate infra (behind proxy). From time to time there is an error (ng e2e --no-webdriver-update) :

manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
i 「wdm」: Compiled successfully.
events.js:183
 throw er; // Unhandled 'error' event
 ^
Error: getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443
 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

It is possible to fix it using following commands :

1) webdriver-manager clean
2) webdriver-manager update --proxy http://user:password@URL:port
3) Replace projectABC\node_modules\protractor\node_modules\webdriver-manager\selenium\
with
%NODE_JS_HOME% \node_modules\protractor\node_modules\webdriver-manager\selenium\

Is it possible to resolve periodic issue with driver ?

Igor Golovan
  • 91
  • 2
  • 11

3 Answers3

1

You can add below scripts in package.json.

1) If you prefer to do webdriver update and run e2e test in single cmd, you can config scripts as following:

  "scripts": {
    "ng": "ng",
    "wd-update": "webdriver-manager clean && webdriver-manager update --proxy http://user:password@URL:port",
    "e2e": "wd-update && ng e2e --no-webdriver-update"
  },

And only need to execute one cmd:

  npm run e2e

2) If you prefer to webdriver update and run e2e test in separate cmd , you can config scripts as following:

  "scripts": {
    "ng": "ng",
    "wd-update": "webdriver-manager clean && webdriver-manager update --proxy http://user:password@URL:port",
    "e2e": "ng e2e --no-webdriver-update"
  },

And execute two cmd:

  // execute `npm run wd-update` before `npm run e2e`. 
  // If you execute below cmds manually, you can skip to
  // execute `npm run wd-update` if you had succeed to execute it before.
  npm run wd-update
  npm run e2e 
yong
  • 13,357
  • 1
  • 16
  • 27
0

Seems that it's known issue of webdriver. You can follow the thread on GitHub: https://github.com/angular/webdriver-manager/issues/260

Kacper
  • 1,201
  • 1
  • 9
  • 21
0

--no-webdriver-update option may be used in order not to update driver each time (ng e2e --no-webdriver-update)

Igor Golovan
  • 91
  • 2
  • 11