-1

I ran my test in BrowserStack and here is an example outcome

enter image description here

How can I turn off this behaviour of Firefox in a selenium test via DesiredCapabilities?

I want to be able to drive this behaviour with settings instead of adding code for a specific browser.

Anthony Kong
  • 29,857
  • 33
  • 139
  • 244

1 Answers1

1

This prompt is related to firefox health report, you can disable it in as: (in java)

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("datareporting.healthreport.uploadEnabled", false);
profile.setPreference("datareporting.healthreport.service.enabled",
                false);
profile.setPreference("datareporting.healthreport.service.firstRun",
                false);
WebDriver driver = new FirefoxDriver(profile);
Vivek Singh
  • 3,351
  • 2
  • 19
  • 27
  • Nice answer dude. Can you provide me the doc of of those preference. I was looking for that couldn't find – Saifur Mar 23 '15 at 21:03
  • 1
    @Saifur it was just one of the issues i got in my past projects so some google at that time made me to have this noted in my quick notes. There are lot of things like telemetry and location that firefox provides you can have a look at them too. For telemetry use `about:telemetry` in url, and for other about config entries [this](http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries) could be useful.. – Vivek Singh Mar 24 '15 at 05:57