Saturday, 17 August 2013

Using Optional Steps in QTP

An optional step is a step that is not necessarily required to successfully complete a run session. For example, suppose that when recording a test, the application you are testing prompts you to enter a user name and password in a login window. When you run the test, however, the
application does not prompt you to enter your user name and password because it retained the information that was previously entered. In this case, the steps that were recorded for entering the login information are not required and should, therefore, be marked optional. During a run session, if the object of an optional step does not exist, QuickTest bypasses this step and continues to run the test. When the run session ends, a message is displayed for the step indicating that the step was not performed, but the step does not cause the run to fail. However, if, during a run session, QuickTest cannot find the object from the optional step in the object repository (for example, if the object name was modified in the test but not in the object repository, or if the object was removed from the object repository), an error message is displayed listing the required object, and the run fails.
Default Optional Steps –
By default, QuickTest considers steps that open the following dialog boxes or message boxes as optional steps:
1. Dialog Box / Message Box Title Bar
2. AutoComplete
3. File Download
4. Internet Explorer
5. Netscape
6. Enter Network Password
7. Error
8. Security Alert
9. Security Information

No comments:

Post a Comment