linux poison RSS
linux poison Email

How To add support for latest version of FireFox in Selenium RC

Following are the steps to patch selenium-server.jar to make it work with any latest version of Firefox (example - FireFox 3.6)

Copy selenium-server.jar file to a directory where you can modify it's contents
cp selenium-server.jar /modified/
cd /modified
Unzip the selenium-server.jar files
unzip selenium-server.jar
We need to patch five instances of a file called ‘install.rdf’. These files can be found at the following locations in the extracted ‘selenium-server.jar’ archive:

/customProfileDirCUSTFF/extensions/{538F0036-F358-4f84-A764-89FB437166B4}/install.rdf
/customProfileDirCUSTFF/extensions/readystate@openqa.org/install.rdf
/customProfileDirCUSTFFCHROME/extensions/{503A0CD4-EDC8-489b-853B-19E0BAA8F0A4}/install.rdf
/customProfileDirCUSTFFCHROME/extensions/{538F0036-F358-4f84-A764-89FB437166B4}/install.rdf
/customProfileDirCUSTFFCHROME/extensions/readystate@openqa.org/install.rdf

In each of these files you will see
<em:maxVersion>3.5.*</em:maxVersion>
Change them to
<em:maxVersion>3.6.*</em:maxVersion>
After patching all the above file, zip the folder and rename it to .jar
zip -r selenium-server *
mv selenium-server.zip selenium-server.jar
Now include this modified jar into your project and your selenium server should now able to run your application on FireFox 3.6.


1 comments:

Unknown said...

installatio of Selenium RC in linux(ubuntu)


1. Open the Terminal & set the path of firefox or any browser

In Linux
ex:- "$PATH= /usr/lib/firefox-3.5.8"

2. Download the Selenium RC from "http://seleniumhq.org/download/" to the desktop

3. Extract the same to the desktop

4. Go insite the Extracted file from the command-line

in our case:

bhavya@ubuntu-73:~/Desktop/selenium/selenium-server-1.0.3$ _

5. Record and save the test suite inside a folder

Here the ex: testsuite has been saved and kept. copy that folder to desktop.

bhavya@ubuntu-73:~/Desktop/selenium/selenium-server-1.0.3$ java -jar selenium-server.jar -htmlSuite "*firefox" "http://www.google.com" "/home/bhavya/Desktop/testsuite/testsuite.html" "/home/bhavya/Desktop/result.html"

general format of -htmlSuite is

6. command promt will look like this...

14:28:36.238 INFO - Java: Sun Microsystems Inc. 14.0-b08
14:28:36.239 INFO - OS: Linux 2.6.28-11-generic i386
14:28:36.246 INFO - v2.0 [a2], with Core v2.0 [a2]
14:28:36.333 INFO - RemoteWebDriver instances should connect to: http://192.168.1.73:4444/wd/hub
14:28:36.334 INFO - Version Jetty/5.1.x
14:28:36.335 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
14:28:36.335 INFO - Started HttpContext[/selenium-server,/selenium-server]
14:28:36.335 INFO - Started HttpContext[/,/]
14:28:50.411 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1c92535
14:28:50.412 INFO - Started HttpContext[/wd,/wd]
14:28:50.418 INFO - Started SocketListener on 0.0.0.0:4444
14:28:50.418 INFO - Started org.openqa.jetty.jetty.Server@192b996
14:28:50.563 INFO - Preparing Firefox profile...

14:28:52.889 INFO - Launching Firefox...

14:28:53.736 INFO - Checking Resource aliases
14:28:58.692 INFO - Checking Resource aliases
14:28:58.693 INFO - Received posted results
14:28:59.406 INFO - Killing Firefox...
Tests failed, see result file for details: /home/bhavya/Desktop/result.html
14:28:59.495 INFO - Shutting down...
14:28:59.518 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]

bhavya@ubuntu-73:~/Desktop/selenium/selenium-server-1.0.3$



-->mean while u can notice the complete run of the testsuite & its result will be stored in result.html(Detailed report)

Post a Comment

Related Posts with Thumbnails