Friday, July 24, 2015

Test Multiple Version of Firefox in Selenium


Description

This article describe how to test multiple version of firefox with Selenium and Firefox Portable.

Demo Video

http://screencast.com/t/NggoPkcusBn

Pre-Request

Rails, minitest and Selenium

Use Remote Webdriver in Selenium

Steps

1. Download firefox portable as needed

For Linux:

PortableLinuxApps


For Windows

Mozilla Firefox, Portable Edition

You can also find other versions at SourceForge

2. Change mode / install

In Ubuntu, you need to run
chomd +x firefox31.0-64bit

to make it executable

In Windows, you need to double-click it to install (extract) it.

3. Write test case and test

For local driver, just update firefox path by
Selenium::WebDriver::Firefox.path = "path/to/firefox/binary"

as needed.

For remote driver, you can specify firefox binary path by
-Dwebdriver.firefox.bin="path/to/firefox/binary"

when run selenium-server-standalone.jar

Added FirefoxPortable version 38 to startup.bat, version 39 to startOpera.bat

For more information, please refer to
 test case and startup.bat.

Added / Updated Files

Added firefox_portable_test.rb


Added vendor/portable_app

Updated startup.bat and startOpera.bat



References

Selenium RubyBindings

how to use different version of firefox using webdriver?

How can you detect the version of a browser?

No comments:

Post a Comment