Selenium Demo Guide
Prerequisites:
1. Mozilla
Firefox
2. Selenium
RC Server (2+): This can be downloaded
http://selenium.googlecode.com/files/selenium-server-standalone-2.8.0.jar
3. Dot-Net
Client Drivers: This can be downloaded from
“http://selenium.googlecode.com/files/selenium-dotnet-2.9.0.zip”
Note:
If above link does not work, then simply go to
“http://seleniumhq.org/download/”
and under “Selenium Client Drivers” Section click download for
your desired specified programming language.
4. Nunit:
This can be downloaded from
http://launchpad.net/nunitv2/2.5/2.5.9/+download/NUnit-2.5.9.10348.msi
.
5. Microsoft
Visual Studio
6. JRE
1.5 or later = JRE must be installed in
your system
Steps
to run Test Scripts
- Download and install Nunit, JRE 1.5 or later, Visual Studio and Mozilla Firefox.
- Download Dot-Net Client Drivers and Install them(For installation purpose Read “Dot-NET client driver configuration” topic below )
- Download Selenium RC server and Place it at Path : “C:\”
- Go to Command Prompt and Enter “cd \”
- In the command prompt Enter C:/ “java -jar selenium-server-standalone-2.8.0.jar -trustAllSSLCertificates”
- Open “FDNetAutomation.sln” file using visual studio 2008 to open the project
- Click Build Solution.
- Open Nunit.
- Open Project by selecting “FDNetAutomation.dll” from Project Path “\FDNetAutomation\bin\Debug\”.
- Right Click in the Test Scripts name pane and Select “Show Checkboxes”
- Select Checkboxes of Test cases you want to run .
- Go to “Test” Menu option and Select “Run All” or “Run Selected” as per requirement.
- Test Results: After completion of test cases Go to “\FDNetAutomation\bin\Debug\” and open “TestResult.xml” this shows the results.
The script
will run now in 2 Mozilla Firefox browsers and if the status will be
failed then there will be a red bar in Nunit and if status will be
passed then the bar will be green.
Among two
browsers one will display the log and other will execute the script
in GUI format.
The browsers
will be automatically closed after the execution of each test case.
If want to
change test data then can change from “\FDNetAutomation\data” and
the corresponding test case XML file.
Note: The
data should be identical in case anything is changed
Dot-NET
client driver configuration
.NET
client Driver can be used with Microsoft Visual Studio. To configure
it with Visual Studio do as Following.
- Launch Visual Studio and Open Your Project.
- Under right hand pane of Solution Explorer right click on References > Add References.
- Go to “Browse” tab under “Add Reference”.
- Navigate to the location where Dot-Net Client Drivers have been downloaded and Extracted.
- Select all “dll” files and click on Ok button.
No comments:
Post a Comment