Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Thursday, 25 May 2017

What is Optional step in QTP ? How you can add optional step in QTP?

 An optional step is a step that is not necessarily required to successfully complete a run session.
During a run session, if the object of an optional step does not exist in the application QTP  bypasses this step and continues to run the test
To set a step as optional in keyword view right click on the step and select Optional Step
Alternatively, you can directly write the keyword "OptionalStep" preceding a statement to make it optional

 Syntax

OptionalStep.StatementToMakeOptional

 Example

The following example uses the OptionalStep object to make the Paris selection from the Depart WebList an optional step.


OptionalStep.Browser("Mercury Tours").Page("Find Flights").
WebList("depart").Select "Paris"


No comments:

Post a Comment

Note: only a member of this blog may post a comment.