The object is not always displayed

Relevant for: GUI tests and scripted GUI components

If the object is displayed only in certain situations or when certain conditions are met, try one of the following:

  • Insert a conditional statement before the step containing the object.

    For example:

    If Browser("Mercury Tours").Page("Find Flights").WebCheckBox("roundtrip").Exist 
    Then
    Browser("Mercury Tours").Page("Find Flights").WebCheckBox("roundtrip").Set "ON"
    End If

  • Set the step containing the object as an optional step.

    For details, see Optional steps.