Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Setting up Selenium

aslakhellesoy edited this page Aug 13, 2010 · 38 revisions

Pre-requisites

Selenium-RC requires the Java Runtime Environment (JRE) version 1.5.0 or higher

Step 1: Install the Selenium gem

sudo gem install Selenium

Step 2: Install Selenium-remote

Unfortunately the jar that the Selenium gem (version 1.1.14) comes with does not work with Firefox 3. So we have to get the latest jar from the Selenium-RC site:

Download the Selenium nightly build:

http://selenium-rc.seleniumhq.org/download.html

Once you have extracted the download we copy:

selenium-remote-control-1.0-SNAPSHOT/selenium-server-1.0-SNAPSHOT/selenium-server.jar

Over the jar that was installed with the Selenium gem:

GEM_INSTALL_DIR/Selenium-1.1.14/lib/selenium/openqa/selenium-server.jar.txt

Step 3: Ubuntu fix (skip if you’re not using Ubuntu)

There is a bug with Selenium and Firefox 3 where Selenium cannot find: firefox-bin

To solve this we create a sym link:

sudo ln -s /usr/lib/firefox-3.0.4/firefox /usr/bin/firefox-bin</pre>

Step 4: Starting Selenium

The Selenium gem installs a script which allows us to get Selenium-RC running

selenium</pre>
OR
you can run the jar directly
java -jar selenium-server.jar.txt</pre>

Step 5: Run the cucumber example

Run the Cucumber Selenium example

cucumber examples/selenium/features/

Useful links

“Official Selenium-RC site”:"http://selenium-rc.seleniumhq.org/

Selenium gem at rubyforge

Clone this wiki locally