问题
I want to do the below in my protractor-cucumber framework. I can not use public repo like googleapi.com as per org policy:
webdriver-manager update --standalone=0 --chrome --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
Also this:
webdriver-manager update --chrome=0 --standalone --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
But i always get this as response:
C:\Users\ABCD\Desktop\JSProjects\protractor-cucumber>webdriver-manager update --standalone=0 --chrome --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/ curl -o C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\downloads\chromedriver.xml https://chromedriver.storage.googleapis.com/ curl https://api.github.com/rate_limit -H "User-Agent: angular/webdriver-manager" [ERROR]: { Error: getaddrinfo ENOTFOUND api.github.com api.github.com:443 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26) errno: 'ENOTFOUND', code: 'ENOTFOUND', syscall: 'getaddrinfo',
hostname: 'api.github.com', host: 'api.github.com', port: 443 } (node:8016) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.keys () at getVersionObjs (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:28:41) at Object.getVersion (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:12:25) at GeckoDriver.updateBinary (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\geckodriver.js:62:43) at process._tickCallback (internal/process/next_tick.js:68:7) (node:8016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:8016) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have also tried to modify the cdn url in ./node_modules/protractor/node_modules/webdriver-manager/config.json
{
"cdnUrls": {
"selenium": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"chromedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"geckodriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"iedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/"
}
}
This one also did not work for me. I got the same error.
I want to know what's the issue here and how can how to resolve it?
Does webdriver-manager expect xml when the request hits custom CDN url?
If yes, is there a way to update if it returns html instead of xml. Because I can see all these drivers in the repo.
来源:https://stackoverflow.com/questions/59395170/webdriver-manager-update-with-alternate-cdn-argument