Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I am using webdriver V 3.0.1 and firefox V 46. I am facing an error as "Your connection is not secure".

enter image description here

Please help me to overcome from this issue. Below you can find my code

System.setProperty("webdriver.gecko.driver","D:\\Software\\Webdriver\\gecko new\\geckodriver-v0.11.1-win64\\geckodriver.exe");

    FirefoxProfile profile = new FirefoxProfile();

    profile.setPreference("network.proxy.type", 0);



    WebDriver driver = new FirefoxDriver(profile);


1 Answer

0 votes
by (62.9k points)

To me, the most simple and efficient solution was to do this

var options = new FirefoxOptions()


    AcceptInsecureCertificates = true


using (var driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options))


    // Your code


I looked into the available constructors and came up with the above code.

Browse Categories