Sie sind auf Seite 1von 8

Table of Contents

1
2
3
4

Description........................................................................................................................................... 5
Version................................................................................................................................................. 5
Selenium-IDE....................................................................................................................................... 5
Writing first UI test Suite...................................................................................................................... 6
4.1
Steps to execute.......................................................................................................................... 6

Step one............................................................................................................... 6
Step two............................................................................................................... 7
Step three............................................................................................................ 7
Step four.............................................................................................................. 8
Step five............................................................................................................... 8
Step six................................................................................................................ 9
Step seven......................................................................................................... 10
Step eight........................................................................................................... 11
Step nine............................................................................................................ 12
Step ten............................................................................................................. 12

Important points to run selenium test case......................................................................................13

Description
Selenium is a robust set of tools that supports rapid development of test automation for web-based
applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of
a web application. These operations are highly flexible, allowing many options for locating UI elements
and comparing expected test results against actual application behavior. We will be using Selenium-IDE
component of selenium for automated testing.

Version
For UI development we need to use Selenium version 1.4.1 in current release.

Selenium-IDE
The first step in using Selenium is to download and install Selenium IDE, which is used to record user
actions that comprise a test.
Selenium IDE is a browser add-on for Mozilla Firefox, which means that we must have Firefox 2.x or 3.x
installed in order to use it.
If we don't have Firefox installed already, we can download it from http://www.mozilla.com/en-US/firefox/?
from=getfirefox
Once we have Firefox installed on the machine, we can download and install Selenium IDE from http://seleniumhq.org/download/.
Firefox will protect us from installing addons from unfamiliar locations, so you will need to click Allow to
proceed with the installation. When downloading from Firefox, well be presented with the following
window.

Select Install Now. The Firefox Add-ons window pops up, first showing a progress bar, and when the
download is complete, displays the following.

Once done Firefox will ask to restart. When Firefox is finished restarting, we'll see the Add-On window
informing us that the installation was successful.

Writing first UI test Suite


4.1 Steps to execute
Step one
From Firefox's View menu, under Sidebar, click Selenium IDE:

Step two
Alternatively, you can do it from Firefox's Tools menu, click Selenium IDE:

Step three
Under selenium File Menu , click on New Suit Test Case.

Step four
Under selenium File Menu , Create new Test Case

Step five
Save the test case as Screen Name <Maintance Type > and <Case Type> like Stope Revoke
Cheque Inquire Success.

Step six
After select Recording ,Run your Screen selenium will capture all events in the tast case.the
below screen is for capturing the login.
Step seven
Add another test case for the same screen for different test case .like Stop Revoke Cheque
Inquire for Amount Success.

Stop Revoke Cheque Inquire Success

Stop Revoke Cheque Inquire Amount Success

Stop Revoke Cheque Inquire Instruction Not Present Failure

Step eight
Under selenium File Menu, Save Test Suite As ,Save it As screen name like Stope Revoke
Cheque .

Step nine
Under selenium File Menu , Click Open test Suite .

Step ten
Run the test suite after clicking on Play entire test suite.

Important points to run selenium test case

Any click event if requires time to perform the operation , change the click as
clickAndwait .

On typing any values in text filed if it has postValueChangeEvent, use typeAndWait.


Or use fire Event after typing in the field.

Test case starts with login page and ends with logout.

For running the same test case for different values changes the values in the script
for corresponding line.

If script is not running due to time out issue on any command like type, click insert
new command Pause and provide the value appropriate to the screen.

Das könnte Ihnen auch gefallen