Saturday, July 2, 2011

Testing Selenium server support for Firefox

The quickest way to test if your selenium server is supporting the Firefox version installed on your machine is to start selenium server in an interactive mode. Let us walk through these steps.

1.Run Selenium server in interactive mode.To do this run the command:
java -jar selenium-server.jar -interactive -singleWindow
2.Start new selenium browser session using the command:
cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
3.If you see a line saying Preparing Firefox profile... and no progress beyond that, there is a high likelihood that the Firefox browser version you have is not supported by your version of selenium server jar you have. If you have Firefox 3.6 and selenium 1.0.1, the next section shows how to fix the problem.
4.If you don’t see a problem, run the following command:
cmd=open&1=http://www.google.com

If the browser starts and you see Google’s home page in it, your basic setup seems to be fine.

Pre-Requisites for setting up Automation Framework using selenium RC + test NG + Eclipse

It's very necessary to have compatible FF version + Selenium IDE support + Selenium RC

Step 1) Install FF ( I am on FF 3.5 )

Step 2) Install selenium IDE (FF plugin)
Note: You need to have the FF installed and then install the compatible selenium ide
FF 3.5 works fine with selenium ide 1.0.8

Download Selenium ide 1.0.8 from : http://release.seleniumhq.org/selenium-ide/

Step 3) Install JRE
Note:For the server to run you’ll need Java installed and the PATH environment variable correctly configured to run it from the console. You can check that you have Java correctly installed by running the following on a console:
java -version
If you get a version number (which needs to be 1.5 or later), you’re ready to start using Selenium RC.


Step 4) Install Eclipse [eclipse-SDK-3.6.2-win32]

Step 5) Download selenium RC (selenium-remote-control-1.0-dist) from http://release.seleniumhq.org/selenium-remote-control/
Note: You need to Add External jars - "selenium-server.jar" and "selenium-java-client-driver.jar" to your project.

Step 6) Install test NG


  • Navigate to Eclipse

  • Click “Install New Software..”

  • Click on Add

  • Enter Name – TestNG, Location - http://beust.com/eclipse

  • Select checkbox for TestNG and Click Next

  • Just follow instruction to complete installation