Dashboard > Selenium Remote Control > Home > Tutorial 2nd step
Selenium Remote Control Log In View a printable version of the current page.
Tutorial 2nd step
Added by Jean Helou, last edited by Jean Helou on Mar 10, 2007  (view change)
Labels: 
(None)

Selenium-RC: The second step

The first step (Reminder)

The first step is to follow the official tutorial. While the last sections are not immediately useful to running the example test, they are important for understanding key mechanisms of selenium rc so go back now and read them.

Understanding the example tests

There are a couple important things to notice about the example tests. First they are all valid, standalone test cases in their respective languages. Then they all have a line similar to these in their respective setup methods:

sel = new DefaultSelenium("localhost",4444, "*firefox", "http://www.google.com");
sel.start();

Last in the test methods of the test cases, you can find the commands to run the test itself. If you are familiar with the other seleniums, you will recognize : open, type, click, etc.

The main thing to see there is that the tests can be run in their own language as instances of the language testcases.

running the test

To run the example tests, simply run them as you would run any testcase in the respective language.For example, with the ruby test all you have to do is run : ruby test_google.rb. In Java I would run the test using the eclipse junit test runner (cuz I am too lazy to even look the command line up).
Now if you rushed ahead and ran them, it probably didn't work. That would be because the tests obviously have to depend on some king of library to understand that they are not only test cases but that they are Selenium test cases (which is obviously holds a much higher status in test cases society).
When you unpacked the selenium-server archive you probably noticed that it contains folder named after the different languages and the server directory where selenium-server.jar lives.
Each of these directories contains the language version of the selenium library. You have to add the directories to the classpath,loadpath, whatever your language of choice uses, to the command line you use to run the tests, same if you need to compile first (hint: java) before you run, but then you would know to add the libraries used to compile your test to the command used to run your test

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators