Creating an If-Then-Else Statement in Icon View
If-Then-Else containers can be created either on one or two containers, messages, or browser actions. They cannot be created on clip elements within a page.
- Select one item to create and If/Then.
- Select two items to create an If-Then-Else. An Else statement can be added at a later time by using drag and drop on any valid clip element (e.g. messages, browser actions, or containers).
- First, identify to clip elements to create the If-Then-Else container. Right-click and choose Create If-Then-Else after doing so.
When you do so, the selected items are placed into the container with the default IF value of Property [not specified].
- Define the IF portion of the statement by selecting from the drop-down. Choose from among Constant, Property, Linked Script, or Embedded Script.
- For a Constant, set the value to True or False. The use of a constant in this context is useful for test creation and provides an additional “debug” mode. In cases where more than two values are possible in a response, consider using the new Switch container.
- For a Property, click Browse to select the value from the Property Chooser dialog box.
- For a Linked Script, click the Script icon to select from the Script Browser. The script must already exist at the time of selection.
- For an Embedded Script, click the Plus icon if necessary to expand the entry field and enter or paste the script.
- Save the test clip after making the above changes.