簡體   English   中英

org.openqa.selenium.remote.UnreachableBrowserException:

[英]org.openqa.selenium.remote.UnreachableBrowserException:

我正在將 Selenium 與醬汁實驗室一起使用,並且我正在嘗試從命令行運行 testng 文件,但自 1 周以來它向我拋出以下錯誤。 它之前工作正常。 有人可以幫我解決這個問題嗎?

 Regression.whitecapQA.Regression1saucechrome.initialization  Time elapsed: 1.876 s  <<< FAILURE!
org.openqa.selenium.remote.UnreachableBrowserException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.0', revision: '2ecb7d9a', time: '2018-10-31T20:09:30'
System info: host: '5CD9270R9Z', ip: '10.232.40.247', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: driver.version: RemoteWebDriver
        at Regression.whitecapQA.Regression1saucechrome.initialization(Regression1saucechrome.java:81)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at Regression.whitecapQA.Regression1saucechrome.initialization(Regression1saucechrome.java:81)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

這里的相關信息是:

引起:sun.security.validator.ValidatorException:PKIX 路徑構建失敗:sun.security.provider.certpath.SunCertPathBuilderException:無法找到請求目標的有效認證路徑

您的代碼無法與 Sauce Labs 服務器建立安全連接。 大多數情況下,發生這種情況是因為您的網絡配置中的某些內容阻止了它。

由於這曾經有效,我建議您個人控制之外但仍在您組織內的某些事情發生了變化。 您的網絡安全工具可能會干擾與 Sauce Labs 的連接,您的代理詳細信息可能已更改,或者您計算機上使用的 SSL 證書包可能已過時。

我會嘗試以下方法:

  1. 確保您的 Java SDK 是最新的
  2. 確保您已正確配置您的 IDE 或環境。 如果您需要顯式代理來連接到 Internet,請確保您已對其進行配置。
  3. 聯系您的網絡安全團隊並詢問您是否應該能夠在端口 80 和 443 上聯系 Sauce Labs 的子域。

您可以嘗試此處的故障排除技巧,以使您的連接在 Sauce Connect 課程中正常工作:

https://training.saucelabs.com/codelabs/Module1-SauceConnect/index.html?index=..%2F..sauceconnect#3

如果這不起作用,請通過發送電子郵件至 support@saucelabs.com 提交支持票

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM