0

I was looking for solution on Stack, but nothing is working in my case. I tried :

    public RemoteWebDriver runDriver()
{

        FirefoxDriverService service = 
        FirefoxDriverService.CreateDefaultService();
        service.HideCommandPromptWindow = true;

        FirefoxBinary fb = new FirefoxBinary();
        FirefoxProfile fprofile = new FirefoxProfile();
        FirefoxOptions fo = new FirefoxOptions();
        fo.Profile = fprofile;

        fprofile.AcceptUntrustedCertificates = true;

and :

    fprofile.SetPreference("network.automatic-ntlm-auth.trusted-uris", very_dangerous_url);

when it gets to the point :

    fb.StartProfile(fprofile);
    return driver;
}

It breaks.

I'm working in C# with Selenium Webdriver and I want my browser to accept one page without certificates.

CEH
  • 5,701
  • 2
  • 16
  • 40
Prus
  • 23
  • 6

1 Answers1

0

This is a different solution than what you are trying to do but will get to you to the same result. You can create a custom firefox profile and export it. This will allow you to load the profile at runtime when creating the driver. Here are steps on how to create your profile. http://toolsqa.com/selenium-webdriver/custom-firefox-profile/. Hopefully this helps you, I use this strategy for firefox settings in c# and it works like a charm.

Buster
  • 685
  • 1
  • 5
  • 28