How can I handle untrusted SSL certificate in Firefox using Selenium Webdriver?

0 votes
How can I handle Untrusted SSL certificate in Firefox using Selenium Webdriver?
Jun 3 in Selenium by Vartika
342 views

1 answer to this question.

0 votes

Hello Vartika, you can handle Untrusted SSL Certificates in Firefox browser by using Firefox profile:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class SSLCertificate {

public static void main(String[] args) {

//It create firefox profile
FirefoxProfile profile=new FirefoxProfile();

// This will set the true value
profile.setAcceptUntrustedCertificates(true);

// This will open  firefox browser using above created profile
WebDriver driver=new FirefoxDriver(profile);

driver.get("pass the url as per your requirement");


}

}
answered Jun 3 by Anvi
• 13,960 points

Related Questions In Selenium

+2 votes
1 answer

How can we handle authentication popup in Selenium WebDriver using Java

The Alert Method, authenticateUsing() lets us skip ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,650 points
9,781 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,430 points
1,190 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,510 points
1,274 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,510 points
1,032 views
0 votes
1 answer
0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29 in Selenium by Anvi
• 13,960 points
374 views