How to use Selenium RCYou Create a New Project to work.
1.Go to File -> New -> Java Project, and enter BeginSelenium into project name field( You can enter another name)
2.Click on and buttons to complete creating project
3.You create a New Class by:

4.The eclipse “New Java Class” wizard appears. You enter “TestLogin” into Name field. NOTE: Java type names usually start with an uppercase letter “TestLogin”
5.Type “com.example.tests” into package. This package used for classes contact together.
6.Click on button. Like this:

7.You create a code in IDE that I have told above chapter that name is “about how to run Selenium IDE. I’ll write a very simple test case to execute by Selenium.”
After that you convert to Java(UNIT) Selenium by:

After convert and copy all of code lines

And you past to Editor of Eclipse. Like this:

8.There are a lot of errors occurs,but don’t worry about it.
9.Next, you copy the TestLogin and overwrite Untitled
10.Removed code from the third line to the seventh line.
11.Change link in SetUp to http://yahoo.com.vn Result:
12.Change “/config/login_verify2?&.src=ym” to “/”. Like this:

13.Error code still display, because they need a Selenium Library and External JARs files of selenium, so you focus to name of project.

14.Press Alt+ ENTER key to open the properties of project

15.You select Java Build Path, see above image.
16.You click on button, a JAVA select dialog appear and find to file .jar file with name selenium-java-client-driver.jar in directory “.... \selenium-remote-control-1.0.3\selenium-java-client-driver-1.0.1”.

17.Click on Open button and click on OK on dialog to close Properties dialog. You will see there is a little error. Like this:

18.To solve the final error, you click on Error icon and select “Configure build path...”.

19.The properties of project appears again, click on “Add Library” button,
20.Select JUnit and click on button

21.Select JUnit 4 in dropdown and click on button

22.Click on button to close the Properties of project.
23.No error appears.

24.There is a Warning, this warning say “import java.util.regex.Pattern;” is never usued. So you can delete this line.
25.OK. We finish test case about Login on yahoo com, now, we run it
26.In order run it, you have to run selenium Server that I told the previous chapter.
27.Right click on name of project --> Run as --> JUnit Test
continue: How to create Test Suite for selenium IDE.
Have a nice day my friends!!!!!!!!!!!!!^^
Đọc Tiếp...