我想在我的量角器黄瓜框架中执行以下操作。根据组织政策,我不能使用像 googleapi.com 这样的公共回购:
webdriver-manager update --standalone=0 --chrome --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
还有这个:
webdriver-manager update --chrome=0 --standalone --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
但我总是得到这个作为回应:
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',代码:'ENOTFOUND',系统调用:'getaddrinfo',
此错误源于在没有 catch 块的情况下抛出异步函数内部,或拒绝未使用 .catch() 处理的承诺。(拒绝 id:1)(节点:8016)[DEP0018] DeprecationWarning:不推荐使用未处理的承诺拒绝。将来,未处理的 Promise 拒绝将使用非零退出代码终止 Node.js 进程。
我还尝试修改 ./node_modules/protractor/node_modules/webdriver-manager/config.json 中的cdn url
{
"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/"
}
}
这个也对我不起作用。我得到了同样的错误。
我想知道这里有什么问题以及如何解决它?
当请求命中自定义 CDN url 时,webdriver-manager 是否期望 xml?
如果是,是否有办法更新它是否返回 html 而不是 xml。因为我可以在 repo 中看到所有这些驱动程序。