开发者

Handling UntrustedSSLcertificates using WebDriver

I got stuck in handling UntrustedSSLcertificates using web driver in Java.

I created firefox profile like:

FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
profile.setAssumeUntrustedCertificateIssuer(false);

I created firefox profile, added over开发者_如何转开发ridden certificate.

This is not handling SSL certificates.

Is there any other way to handle UntrustedSSLcertificates?


//Firefox example with URL www.google.com

FirefoxProfile profile=new FirefoxProfile();

profile.setAssumeUntrustedCertificateIssuer(false);

driver=new FireforDriver(profile);

driver.get("https://google.com");


Eventually I found solution for Untrusted SSLCertificates:

ProfilesIni allProfiles = new ProfilesIni();
System.setProperty("webdriver.firefox.profile","your custom firefox profile name");
String browserProfile = stem.getProperty("webdriver.firefox.profile");
FirefoxProfile profile = allProfiles.getProfile(browserProfile); 
profile.setAcceptUntrustedCertificates (true); 
webdriver = new FirefoxDriver(profile); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜