How to suppress the "checking compatibility of add-ons" dialog in Firefox with Selenium? How to suppress the "checking compatibility of add-ons" dialog in Firefox with Selenium? selenium selenium

How to suppress the "checking compatibility of add-ons" dialog in Firefox with Selenium?


This dialog is shown only once whenever Firefox is updated. The reason it is shown each time for you is probably that Selenium creates a new profile each time. If you set extensions.lastAppVersion preference to "12.0" (or whatever the current Firefox version is) then Firefox will no longer think that it has been updated and won't show this dialog. However, it should be easier to add a extensions.showMismatchUI preference and set it to false, this will suppress this dialog (but not the other upgrade actions).

Side-note: extensions.checkCompatibility preference no longer does anything starting with Firefox 3.6, it is a version-specific preference in the current Firefox versions. So you would have to set extensions.checkCompatibility.12.0 preference instead. That disables compatibility checking for extensions completely however, not just the dialog you are concerned about.


I have tried setting extensions.checkCompatibility to false. This fixed it if I launched Firefox normally, but not if I launch it with Selenium.

The reason it won't when you launch it with Selenium is the Firefox Driver will create a temporary profile in the temporary files directory, slowing down tests and taking up unnecessary space.

Create a profile for your test purposes and set what you need. Full instructions to create the SeleniumProfile can be found at https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

In Java I have the following:

protected WebDriver createFirefoxDriver() {         File proFile = new File("C:\\Users\\<username>\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\xxxxxx42.SeleniumProfile");    FirefoxProfile ffProfile = new FirefoxProfile(proFile);    WebDriver ffDriver = new FirefoxDriver(ffProfile);    return ffDriver;}


Do this to remove the "checking for addon's compatibility" Dialog. This is based on the Windows operating system..

Create a temporary FF Profile and start the server with that profileas shown below.

java -jar selenium-server-x.x.x.jar -firefoxProfileTemplate "/path/to/the/temp/profile"

Now use the following code.

import com.thoughtworks.selenium.*;public class Test {public static void main(String ar[]) {Selenium sel = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com/");sel.start();}}

Now in the Run command type "%TEMP%" and you can see there a folder with same name as the selenium session. Copy the folder contents and replace them with your temp profile Contents.

Follow the steps below to remove the Addons compatibility.
1 . Create a new FF Profile
2 . Set the FF Profile as per required settings
3 . Just run a sample program of selenium such that it invokes firefox.
4 . Now you can find a folder with the same name as Selenium Session created somewhere in your sytsem. ( Most probably in the directory where the Temporary Content is saved)
5 . Copy the folder contents and replace them with the newly created profile.

Now you can use the newly created profile whenever required. Whenever FF is updated , always check whether the existing addons are compatible with the Existing version by once invoking firefox with the Profile.