Monday, August 11, 2008

When are optional steps used?

When recording a test or component, the application you are testing may prompt you to enter a user name and password in a login window. When you run the test or component, however, the application does not prompt you to enter your user name and password, because it has 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.
When running a test or component, if a step in an optional dialog box does not open, QuickTest bypasses this step and continues to run the test. When the run session ends, a message is displayed for the step that failed to open the dialog box, but the step does not cause the test or component to fail.
To set an optional step in the Keyword View, right-click a step and choose Optional Step.You can also add an optional step in the Expert View by adding OptionalStep to the beginning of the VBScript statement. For example:OptionalStep.Browser("Browser").Page("Yahoo! Mail - The best").WebEdit("login").Set "uday"

No comments: