Closed Bug 1311961 Opened 8 years ago Closed 7 years ago

Object reference not set to an instance of an object error on setting FirefoxProfile properties via FirefoxOptions Instance

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: rashu09be, Unassigned)

Details

Code sample:
 
//Line1
FirefoxDriverService driverService = FirefoxDriverService.CreateDefaultService("D:\\abcd\\DriverFolder", "geckodriver.exe");
//Line 2
 driverService.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\Firefox.exe";
//Line 3
FirefoxOptions options = new FirefoxOptions();
//Line 4
options.Profile.AssumeUntrustedCertificateIssuer = false;
//Line 5
options.SetPreference("browser.cache.offline.enable", false);
//Line6         
 IWebDriver webDriver = new FirefoxDriver(driverService, options, TimeSpan.FromMinutes(20));

In order to run automation on firefox using marionette(selenium c#) ,we need to pass FirefoxOptions instance as an argument to FirefoxDriver ,hence only way to set "AssumeUntrustedCertificateIssuer" is via FirefoxOptions instance.On trying this i get Object reference not set to an instance of  an object(Ex:Line 4 in above code sample)
This is would appear to be a Selenium bug.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.