Вы находитесь на странице: 1из 3

Selenium RC Documentation 1. Download the Selenium RC Server for the 2. Download the selenium RC client 3.

Create a JAVA project from netbeans (Default project option) 4. Add the Jar file to the project by 5. Right click the project select Properties -> libraries -> Add JAR/Folder 6. Browser the JAR files and adds it. 7. The JAR files are Java- client files. 8. Right click on test packages and add a new package. 9. Create a class in for that package. 10.Export the selenium code in JUNIT format option. 11.Add the exported the code to the class of the package. 12.Edit and remove the extending the class name. 13.Right click on the class and select run.

Selenium RC - A Complete Run Step 1: Download the selenium Server Selenium Server (formerly the Selenium RC Server) The Selenium Server is needed in order to run either Selenium RC style scripts or Remote Selenium Web driver ones. The 2.x server is a drop-in replacement for the old Selenium RC server and is designed to be backwards compatible with your existing infrastructure. Download version 2.1.0 or read the RC1 Release Announcement, RC2 Supplemental Announcement and RC3 Release Announcement (At the time of writing this document) Filename: selenium-server-standalone-2.1.0.jar Step 2: Download the selenium Client Selenium Client Drivers In order to create scripts that interact with the Selenium Server (Selenium RC, Selenium Remote Web driver) or create local Selenium Web Driver script you need to make use of language-specific client drivers. Unless otherwise specified, drivers include both 1.x and 2.x style drivers. Java client driver for Running Selenium RC using Java The jar files includes the two jar files selenium-java-2.1.0.jar selenium-java-2.1.0-srcs.jar and all the files available inside the lib folder

Step 3: Export the Selenium Script in Java format (JUnit 4) Record the Selenium script using Selenium IDE and the export the script in JUnit 4 format. Step 4: Create a Java Project in Net beans IDE Select File New Project, Select Java in categories and Java Application in Projects section. Click on Next button. Enter the project name and Select the project location and the project folder location. Click on Finish button. A project will be created with the name specified and the project will have the following section Source Packages Test Packages Libraries Test Libraries

Step 5: Adding jar files to the project Right click on the project name and select Properties, Select Libraries and click on Add JAR/Folder button, browser the jar file location (Selenium Client jar files) and click on ok button.

The jar files includes the two jar files selenium-java-2.1.0.jar selenium-java-2.1.0-srcs.jar and all the files available inside the lib folder

Step 6: Adding a package to the Test Packages Right click on Test Packages and click on New Java Package. New Java Package window will appear enters the Package Name and ensures that the package is added to the current project. Click on Finish button. Step 7: Create a class under the newly added test package Click on the newly added java package and select New Java Class. New Java Class window will appear enter the Class Name and Ensure that the Class file is added to the current package and under the package added. Click on Finish button. Step 8: Adding the Selenium JUnit script the class files and to the added package. Step 9: Run the Selenium Server. Before starting any tests you must start the server. Go to the directory where Selenium RCs server is located and run the following from a command-line console. java -jar selenium-server-standalone-<version-number>.jar
Step 10: Run the Test package Click on the class file and select run option to run the Selenium RC using Java.

Вам также может понравиться