views:

96

answers:

1

Every time I launch a Firefox instance via Selenium RC I get 3 windows that I don't need appearing:

  • the add-ons windows notifying me that "3 new add-ons have been installed" (since I'm using a custom profile for Selenium to which it evidently adds the DocumentReadyState, KillFF, and Selenium RC Runner add-ons)

  • the http://localhost:4444/selenium-server/core/Blank.html?start=true window

  • the dual window with two tabs starting with chrome://src/content/RemoteRunner.html?sessionId=... each

I don't need any of these to be visible, and each time I have to manually close the add-ons window, to minimize the two other windows, and to maximize the main browser windows which Selenium controls. After going through this too many times, I got annoyed enough to seek a solution:

Is there any way to automate closing the add-ons window and minimizing the two other windows?

By the way, I'm on OS X so I'd also appreciate some alternative solution which automates this via the OS instead of directly using Selenium.

+2  A: 

There's a few preferences you can change in your custom profile to prevent the addons window and the additional tab on startup:

  1. Set the extensions.lastAppVersion preference to the version of Firefox that you have installed.
  2. Set the extensions.newAddons preference to false.
  3. Set the extensions.update.notifyUser preference to false.

There might be some more, perhaps others can provide their suggestions in comments or their own answers.

As long as Selenium is running in multi window mode (the default mode) you'll get two browser windows. You could either maximize the main window using the following command:

selenium.windowMaximize();

Or use the multiWindow command line parameter to disable the use of multuple windows and just use a single window - note that this causes issues on some websites, especially if they attempt to break out of frames.

Dave Hunt