企业代理背后的 Webdriverio 设置

Webdriver IO Setup behind the cooperate Proxy

我确实安装了 WebDriver IO v7.11。但是当我尝试配置

npx wdio config

得到以下错误。

npm ERR! code 1
npm ERR! path c:\<folder>\node_modules\chromedriver
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
npm ERR! Downloading from file:  https://chromedriver.storage.googleapis.com/92.0.4515.107/chromedriver_win32.zip
npm ERR! Saving to file: C:\Users\XXX\AppData\Local\Temp.0.4515.107\chromedriver\chromedriver_win32.zip
npm ERR! Using workaround for https-url combined with a proxy.
npm ERR! ChromeDriver installation failed Error: Error with http(s) request: Error: unable to get local issuer certificate
npm ERR!     at requestBinary (c:\<folder>\node_modules\chromedriver\install.js:265:11)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:95:5)
npm ERR!     at async downloadFile (c:\<folder>\node_modules\chromedriver\install.js:109:5)

合作代理外工作正常。任何想法

我能够解决问题。我希望这可能对其他人有所帮助。

我设置了一个环境变量

set NODE_TLS_REJECT_UNAUTHORIZED=0
再次

和 运行。工作了。