我正在尝试用java构建我的自动化框架,但是在运行测试时,我遇到了以下问题。请指点!
Failed to install browsers
Error: Failed to download chromium v1000, caused by
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
Exception in thread "main" java.lang.RuntimeException: Failed to create driver
at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:61)
at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:40)
at com.microsoft.playwright.Playwright.create(Playwright.java:96)
at com.microsoft.playwright.Playwright.create(Playwright.java:100)
at Example.main(Example.java:5)
Caused by: java.lang.RuntimeException: Failed to install browsers, exit code: 1
at com.microsoft.playwright.impl.DriverJar.installBrowsers(DriverJar.java:76)
at com.microsoft.playwright.impl.DriverJar.initialize(DriverJar.java:48)
at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:57)
... 4 more发布于 2022-08-11 11:43:39
我可以通过设置env来禁用下载(因为它已经安装了npx剧作家安装)来解决这个问题。
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1IntelliJ IDE运行配置

发布于 2022-05-15 18:27:24
这不是剧作家或Maven的问题。你自己能修好的。如果您只想避免问题,而不是解决问题,您可以遵循以下建议:https://community.claris.com/en/s/question/0D53w00005GuQXxCAN/nodejs-fmsapiclient-unable-to-verify-the-first-certificate-local-server,即通过将系统变量设置为零
https://stackoverflow.com/questions/71917914
复制相似问题