Posts mit dem Label Selenium werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Selenium werden angezeigt. Alle Posts anzeigen

Mittwoch, 5. September 2012

Customizing Firefox - Disabling Safe Mode

Some changes for disable safe mode Add-on

If you use selenium tests case with grid component you sometimes get safemode dialogs in firefox. On http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/ you can find a great solution to fix that dialogs but this integrated Disable Safe Mode Firefox Add-on seems to not be working with current Firefox Version (15.0).

The reason is, that the "onOK()" method in safeMode.js (http://dxr.mozilla.org/mozilla-central/browser/base/content/safeMode.js.html) has been removed.

Following changes helped to get it working again.

chrome.manifest (in distribution/bundles/disablesafemode)


content disablesafemode content/

overlay chrome://browser/content/safeMode.xul chrome://disablesafemode/content/safeMode.xul
override chrome://browser/content/safeMode.js chrome://disablesafemode/content/safeMode.js


safeMode.xul (in distribution/bundles/disablesafemode/content)


<?xml version="1.0" encoding="UTF-8"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<dialog hidden="true" id="safeModeDialog" onload="onExtra1()"/>
</overlay>


The last change is to copy the content of safeMode.js (http://dxr.mozilla.org/mozilla-central/browser/base/content/safeMode.js.html) in safeMode.js (in distribution/bundles/disablesafemode/content) an set 

defaultToReset = true //line 12


You can test it by starting Firefox with the -safe-mode parameter or holding down the shift key on Windows or option key on Mac. You'll see the safe mode window show up for a second (sized very small) and then the browser will restart.

Montag, 23. Mai 2011

Selenium RC: Firefox 3 could not be found in the path!

Nach der Umstellung auf Window 7 (64 bit) lieferten alle Selenium (RC) Tests folgende Fehlermeldung:
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment
variable
Der Fehler konnte durch das Hinzufügen von "C:\Program Files (x86)\Mozilla Firefox" zu den Umgebungsvariablen (PATH) behoben werden

Mittwoch, 4. Mai 2011

Selenium IDE (1.0.11) für Firefox 4

Da die aktuelle Version (1.0.10) der Selenium IDE nicht im Firefox 4 läuft und ein einfaches Hochsetzen der maxVersion in der install.rdf auch Probleme macht, gibt es hier eine Vorabversion (Testversion) der IDE in Version 1.0.11.