Use existing Firefox profile with disabled JavaScript, in C# Selenium

145 views Asked by At

I am trying to use an existing Firefox profile, that I created, and in which I went to about:config and set javascript.enabled to false manually.

var profileManager = new FirefoxProfileManager();
FirefoxProfile fxProfile = profileManager.GetProfile("nojs");
FirefoxDriver driver = new FirefoxDriver(fxProfile);

But when the driver starts, JavaScript is still being enabled.

Any suggestions, please!

0

There are 0 answers