How to configure Selenium RC?
Open Elipse and create a new Java project. Create a new class and import the downloaded Selenium RC Jar file into the current project
Start Selenium RC standalone server:
Open command prompt and go to the directory where the Selenium RC jar file was kept and then write:
java -jar selenium-server-standalone-2.20.0
Writing the first Selenium RC code:
Create a new class file and copy paste the above code. Now run it as a Java application.
Basic Selenium RC methods:
- selenium.start() - Takes you to the location where selenium server is and runs the server.
- selenium.open() - Takes you to the provied URL/Website address.
- selenium.getTitle() - Get the title of the current browser window.
- selenium.windowFocus() - Get the focus on the current window.
- selenium.windowMaximize() - Maximizes the current window.
- selenium.close() - Close the current browser window.
SELENIUM RCWhat is Selenium RC?
Selenium RC (Remote Control) is an automation test tool that allows to create automation scripts for web based testing in any programming language such as JAVA, C#, PHP, Ruby, Python etc.
Selenium RC comes in two parts:
1) Selenium server - Launches the browser and execute the test cases.
2) Selenium remote control - Provides an application programming interface with lots of libraries to support different programming languages.
With different programming language and object oriented support gives you the ability to create more complex test cases that are not possible through Selenium IDE. You can executes these test cases as many time as required by using frameworks available in Java i.e. TestNG or JUnit. Also helpful while handling expected exceptions.