2
votes

I'm working on a project based on Angular (5.0.0). As I am behind a proxy, I want to specify an internal CDN where ChromeDriver is hosted.

My .npmrc file contains the following property: chromedriver_cdnurl=http://my-internal-cdn/chromedriver/ (also tested with alternate_cdn, without changes).

My command to run e2e is npm run e2e (which runs ng e2e --proxy-config proxy.conf.json) and fails with the following error:

webpack: Compiled successfully. events.js:182 throw er; // Unhandled 'error' event ^

Error: getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443 at errnoException (dns.js:53:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:95:26) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] e2e: ng e2e --proxy-config proxy.conf.json

I'm not sure how I can tell to ng-cli to use this property so webdriver-manager can download the binaries from an internal CDN and not from chromedriver.storage.googleapis.com. Any idea?

I've not found anything interesting regarding this point in the protractor configuration.

Thanks.

1
I think it duplicate to stackoverflow.com/questions/48026467/…, if not please tell me. - yong
Hi @yong Thanks. The issue is quite related but it's not exactly the same thing. On your pointer, the question is "how can I use my proxy settings for webdriver manager". I don't want to use the proxy but force webdriver-manager to look in an internal CDN for binaries. - Romain Linsolas

1 Answers

3
votes

Option 1) modify the cdnurl in node_modules/protractor/node_modules/webdriver-manager/config.json

{
  "cdnUrls": {
    "selenium": "https://selenium-release.storage.googleapis.com/",
    "chromedriver": "https://chromedriver.storage.googleapis.com/",
    "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/",
    "iedriver": "https://selenium-release.storage.googleapis.com/",
    "androidsdk": "http://dl.google.com/android/"
  }
}

Option 2) webdriver-manager has a cli option: --alternate_cdn for change cdn url, you can check by run webdriver-manager --help. But you use ng e2e which can't accept --alternate_cdn from command line