Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox: Disable automatic safe mode after crash

How to prevent firefox showing the safe mode dialog after the crash? enter image description here

It blocks the automatic selenium tests.

like image 264
mmm Avatar asked Jan 22 '14 15:01

mmm


People also ask

Where Is Safe Mode in Firefox?

Hold down the ⌥ Option key. Click (or double-click) Firefox. Release the ⌥ Option key when Firefox opens. Click Start in Safe Mode when prompted.


1 Answers

I have no idea how you got this and what your testing flow is. So I can't reproduce and test the solution. But Firefox Safe Mode can be disabled by setting the key toolkit.startup.max_resumed_crashes in about:config to -1.

Here's how to start Firefox with that preference set in C# binding:

FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("toolkit.startup.max_resumed_crashes", "-1");

IWebDriver driver = new FirefoxDriver(profile);
like image 107
Yi Zeng Avatar answered Sep 29 '22 00:09

Yi Zeng