IF Statements for Mobile Tests
Introduction
IF Statements are similar to assertions.
There are certain scenarios where we need to execute some steps only if a certain condition is met.
IF Statements can be nested in other IF Statements.
An IF Statement can cross the boundary of a test case and continue into the next test case.
Solution
IF Statements can be added by using the Start If Statement
action.
In order to close an IF Statement, we need to use the End If Statement
action.
You can choose from the following types of IF Statements:
- Element Is Present
- Element Is Not Present
- Element Matches Value
- Element Does Not Match Value
- Element Contains Value
- Element Does Not Contain Value
- Element Contains Attribute
- Element Does Not Contain Attribute
- Variable Assertion
- Page Source Contains Value
- Page Source Does Not Contain Value
- Page Matches Screenshot
- Element Matches Screenshot