Browser.download.manager.showWhenStarting cannot be overridden

I am using selenium webdriver for firefox in a C # project. After installing the latest version of webdriver (2.40) with the NuGet package manager, this error occurred:

The type initializer for the class Class made an exception. ---> System.ArgumentException: preference browser.download.manager.showWhenStarting cannot be overridden: frozen value = False, requested value = False.

My code is:

FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("browser.download.manager.showWhenStarting", false);
webdriver = new FirefoxDriver(profile);

The error occurs in the second line. Do you know how this can be solved?

+3
source share
1 answer

.NET , , , , , FirefoxDriver . , , "" . , . , .


, , , :

:

profile.SetPreference("network.http.phishy-userpass-length", 255);

:

System.ArgumentException: network.http.phishy-userpass-length : frozen value = 255, value = 255

SetPreference() .

+5

All Articles