Programmatically remove Firefox's license agreement dialog
Question
I am running regression tests with Selenium and am automatically launching instances of Firefox.
The problem is my tests get stuck because of Firefox's license agreement dialog:
Copyright notice http://img151.imageshack.us/img151/3467/31963141.png.
I can't click with the mouse because I am in an headless environment with a virtual graphical environment.
I would like to know what Firefox's file can I edit (and how to edit it) to trick Firefox into thinking somebody accepted the copyright.
Clarification following comments
I need to do it just once. But I can't do it with the mouse as this is a virtual graphic environment and I don't have mouse or see the mouse pointer. I can however take screenshots.
Solution
OK, I found it by myself in the end.
The right answer is:
In the Firefox installation, look for firefox.js
Find this line:
pref("browser.EULA.3.accepted", false);
and replace false
whit true
Thanks to all that helped.
OTHER TIPS
According to this link text its been removed - but it look like a later version than yours.
In Firefox 3.0.10 it's hidden in the about:config
under
browser.rights.3.shown
Set it to true
and you're done.
Write a Selenium test that clicks "I agree"
or
add whatever "agreed" setting makes Firefox skip this to the Firefox profile's prefs.js
or
just use a Firefox profile that has already agreed to the license.
There are two override prefs (the latter being the "legacy EULA pref"), which you can override in prefs.js in the profile directory:
user_pref("browser.rights.override", true);
user_pref("browser.EULA.override", true);