Monday, June 3, 2013

WHAT ARE THE STEPS TO RUN SCRIPTS USING SELENIUM RC


 STEPS TO RUN SCRIPTS USING SELENIUM RC


Create folders:
Create a folder in any drive – Ex: C:\tests
Create a folder in any drive – Ex: C:\results
We need to create two folders.
1.  To save our test suite and test case. (tests)
2.  To save results (results)
Using Selenium IDE record a test case and save it as .html in a tests folder.
Make sure your test run correctly.
Create a Test suite:
Create a test suite and save it in C:\tests folder
To run our tests in Selenium Remote Control we will have to use the –htmlsuite
argument. This tells Selenium to open the Test Suite that we created. We then
need to tell it where to find the Test Suite and then where to write the results to.
Our command in Command Prompt or a console window will be similar to the
following snippet:
We can run our tests in any browser by using selenium RC.
Synatx:
java -jar selenium-server.jar -htmlSuite "*browser"
"http://www.example.com" "target folder" "results folder“
RUN THE ABOVE COMMAND FROM COMMAND PROMPT
Run this command from selenium directory.
Example:
C:\s0elenium>java -jar selenium-server.jar -htmlSuite "*iexplore"
"http://www.google.com" "c:\tests\run.html“ "c:\results\results1.html

No comments:

Post a Comment