How to disable image and flash loading when using Selenium with Firefox?

When testing selenium through Selenium RC in Firefox 3, the instance of Firefox that launches to run the tests always displays images, even if I installed Firefox 3 so as not to display the images.

Does anyone know how to disconnect images from downloading?

I would also like to disconnect the flash file from loading on the test pages.

0
source share
1 answer

When you start RC-selenium from the command line, you can provide the command line argument -firefoxProfileTemplate, where dir is the location of the Firefox profile that you want to use. Example:

java -jar selenium-server.jar -firefoxProfileTemplate "C: \ Documents and Settings \ YOUR_USERNAME \ Application Data \ Mozilla \ Firefox \ Profiles \ gj4zmzhp.default"

You can then customize the Firefox profile that you use, anyway, if you want. To disable the flash drive, you can go to tools-> Add-ons in Firefox, and then on the Plugins tab, turn off the Shockwave Flash plugin ..

+3
source

All Articles