Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 overridden certificate.

This is not handling SSL certificates.

Is there any other way to handle UntrustedSSLcertificates?

like image 530
chakri Avatar asked Nov 26 '22 13:11

chakri


1 Answers

//Firefox example with URL www.google.com

FirefoxProfile profile=new FirefoxProfile();

profile.setAssumeUntrustedCertificateIssuer(false);

driver=new FireforDriver(profile);

driver.get("https://google.com");
like image 120
Archana Singh Avatar answered Dec 09 '22 19:12

Archana Singh