搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Selenium not able to assume untrusted certificate issuer

  • 無回覆
  • 1 有這個問題
  • 6 次檢視
more options

I am a C# programmer and i am using Selenium to test web applications. With the newest updates, firefox is not able to assume untrusted certificate issuer. Firefox does not work regardless, it does not matter what i am trying to do. I am testing on a seperated server via RemoteWebriver. Chrome and internet explorer work fine.

Here is a little snippet of my actual code [...] var uri = new Uri($"http://{ServerProperties.Address}:4444/wd/hub"); [...]

                   case "InternetExplorer":
                       return new RemoteWebDriver(uri, DesiredCapabilities.InternetExplorer());
                   case "Firefox":
                       FirefoxProfile profile = new FirefoxProfile();
                       profile.AcceptUntrustedCertificates = true;
                       profile.AssumeUntrustedCertificateIssuer = true;
                       DesiredCapabilities dc = DesiredCapabilities.Firefox();
                       dc.SetCapability(FirefoxDriver.ProfileCapabilityName, profile);
                       return new RemoteWebDriver(uri, dc);
                   case "Chrome":
                       return new RemoteWebDriver(uri, DesiredCapabilities.Chrome());

[...]

Thanks for your help

I am a C# programmer and i am using Selenium to test web applications. With the newest updates, firefox is not able to assume untrusted certificate issuer. Firefox does not work regardless, it does not matter what i am trying to do. I am testing on a seperated server via RemoteWebriver. Chrome and internet explorer work fine. Here is a little snippet of my actual code [...] var uri = new Uri($"http://{ServerProperties.Address}:4444/wd/hub"); [...] case "InternetExplorer": return new RemoteWebDriver(uri, DesiredCapabilities.InternetExplorer()); case "Firefox": FirefoxProfile profile = new FirefoxProfile(); profile.AcceptUntrustedCertificates = true; profile.AssumeUntrustedCertificateIssuer = true; DesiredCapabilities dc = DesiredCapabilities.Firefox(); dc.SetCapability(FirefoxDriver.ProfileCapabilityName, profile); return new RemoteWebDriver(uri, dc); case "Chrome": return new RemoteWebDriver(uri, DesiredCapabilities.Chrome()); [...] Thanks for your help