3

from this answer

FirefoxProfile firefoxProfile = new FirefoxProfile();

firefoxProfile.setPreference("browser.download.folderList",2);
firefoxProfile.setPreference("browser.download.manager.showWhenStarting",false);
firefoxProfile.setPreference("browser.download.dir","c:\\downloads");
firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv");

WebDriver driver = new FirefoxDriver(firefoxProfile);

How can I set properties like browser.download.manager.showWhenStarting when using nightwatch?

Community
  • 1
  • 1
user1929819
  • 363
  • 3
  • 13

1 Answers1

2

From my understanding the only way to accomplish this is to create a profile before hand and use that profile in nightwatch configuration, similar to the insructions here: https://github.com/nightwatchjs/nightwatch/wiki/Enable-Firebug-in-Firefox-for-Nightwatch-tests

I wish there was a way to set firefox preferences, since with the solution I'm providing your tests are dependent on running on the machine with the profile.

Madison Haynie
  • 448
  • 4
  • 13