How do I disable images and Flash from loading when using Selenium with Firefox?
Asked Answered
R

1

1

When running selenium tests through Selenium RC in Firefox 3, the instance of Firefox that launches to run the tests in always displays images even though I've setup Firefox 3 to not display images.

Do anyone know how to disable the images from loading?

I'd also like to disable flash from loading on the test pages as well.

Retentive answered 11/5, 2009 at 17:23 Comment(0)
B
3

When you launch selenium RC from the command line, you can provide the command line arguement of -firefoxProfileTemplate , where dir is the location of the Firefox profile you wish 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 configure the Firefox profile your using anyway you see fit. To disable flash, you can go to the tools->Add-ons in Firefox and then in the Plugins tab, disable the Shockwave Flash plugin.

Behalf answered 1/6, 2009 at 23:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.