Running our tests, we encountered a problem related to the way FireFox manages the events when the browser doesn't have the focus.
We found out that this problem can be solved setting up a FireFox profile with the preference "focusmanager.testmode" set to true (https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/157).
My question is, do you know of any other preference/capability/whatever that is worth having in our profile/configuration of the webdriver?
This could save us a lot of time in the future debugging strange problems/behaviours and I'd really appreciate any advise that you could give me.
Firefox has all sort of preferences that can be tweak to improve tests stability. But as pointed out by Andrew Regan changing anything may affect your tests so, may be not a best idea.
Anyhow this is a set of prefs I use to make tests fail less often due to unexpected browser behaviour:
// Disable checking if firefox is default browser
lockPref('browser.shell.checkDefaultBrowser', false);
// Disable restoring session
lockPref('browser.sessionstore.resume_from_crash', false);
// Disable updater
lockPref("app.update.enabled", false);
// make absolutely sure it is really off
lockPref("app.update.auto", false);
lockPref("app.update.mode", 0);
lockPref("app.update.service.enabled", false);
// Prevent closing dialogs
lockPref("browser.showQuitWarning", false);
lockPref("browser.warnOnQuit", false);
lockPref("browser.tabs.warnOnClose", false);
lockPref("browser.tabs.warnOnCloseOtherTabs", false);
// Disable Add-ons compatibility checking
clearPref("extensions.lastAppVersion");
// Don't show 'know your rights' on first run
pref("browser.rights.3.shown", true);
//Disable plugin checking
lockPref("plugins.hide_infobar_for_outdated_plugin", true);
clearPref("plugins.update.url");
// Disable health reporter
lockPref("datareporting.healthreport.service.enabled", false);
// Disable all data upload (Telemetry and FHR)
lockPref("datareporting.policy.dataSubmissionEnabled", false);
// Disable crash reporter
lockPref("toolkit.crashreporter.enabled", false);
Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;
// Browser Console command line
pref("devtools.chrome.enabled", true);
To automate the process of setting up prefs you may like to use so called Firefox autoconfig file. Sample configuration: https://github.com/cliqz-oss/firefox-autoconfigs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With