For the Selenium 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 command on a console:
java -versionIf you get a version number (which needs to be 1.5 or later), you’re ready to start using Selenium-RC
Selenium Remote Control (RC) is a test tool that allows you to write and/or execute automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
After downloading and unzipping the Selenium-RC zip file, you will see a folder selenium-remote-control-<version> containing the following sub-directories:
selenium-dotnet-client-driver-<version>
selenium-java-client-driver-<version>
selenium-perl-client-driver-<version>
selenium-php-client-driver-<version>
selenium-python-client-driver-<version>
selenium-ruby-client-driver-<version>
selenium-server-<version>
These folders have all the components you need for using Selenium-RC with the programming language of your choice.
The Selenium-RC server is simply a Java jar file, which doesn’t require any special installation. Just extracting the server in the desired directory is sufficient.
After unzipping of Selenium-RC zip file the path to the Java jar file should be: selenium-remote-control-<version>/selenium-server-<version>/selenium-server.jar
The driver which you need to install is selenium-perl-client-driver-<version>.
The path to the Makefile.PL file should be: selenium-remote-control-<version>/selenium-perl-client-driver-<version>/Makefile.PL
In order to install the driver go to the directory where the Makefile.PL is located and run it (from a command-line console) as shown below:
perl Makefile.PLOnce the perl driver is install, you can start the selenium server.
$ mkdir selenium_tests $ cvs co -d selenium_tests eg-plugins/testsuite/selenium_Location.pl $ cvs co -d selenium_tests eg-plugins/testsuite/selenium_Gene.pl $ cvs co -d selenium_tests eg-plugins/testsuite/selenium_Transcript.pl
The script selenium_Location.pl is meant to test for broken or non-existent links in the Location section of Human genome page in Ensembl website.
Respectively, the script selenium_Gene.pl is meant to test for broken or non-existent links in the Gene section and the script selenium_Transcript.pl is for testing of the Transcript section of Human genome page in Ensembl website.
Before starting any tests you must start the server. Go to the directory where Selenium-RC’s server is located and run the following from a command-line console.
java -jar selenium-server.jarThis can be simplified by creating a batch or shell executable file (.sh on Linux) containing the command above.
After the successful starting of the server the tests are ready to be run.
Each of the scripts can accept two (optional) parameters:
$ perl selenium_Gene.pl --url="http://www.ensembl.org" --skip="External Data, Gene history"