简体   繁体   中英

Accepting untrusted SSL certificate using webdriver for a window that opens up on clicking a menu option

upon clicking a menu option in my application , it opens a new window which opens an URL where SSL cert has to be accepted.

I have added code in my Webdriver connection class , like :-

FirefoxProfile firefoxprofile = new FirefoxProfile();
firefoxprofile.setAcceptUntrustedCertificates(true);
firefoxprofile.setAssumeUntrustedCertificateIssuer(false);
capabilities.setCapability(FirefoxDriver.PROFILE, firefoxprofile);
driver = new FirefoxDriver(capabilities);

But this particular scenario is not getting handled by the above code...and I still get the untrusted SSL cert .... I am not sure how to handle this...

尝试以下代码

FirefoxProfile firefoxprofile = new FirefoxProfile(); firefoxprofile.setAcceptUntrustedCertificates(true); firefoxprofile.setAssumeUntrustedCertificateIssuer(false); driver = new FirefoxDriver(firefoxprofile);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM