"ASSERT" Command

Description: This command is used to force test case failure if it reaches this step.
Usage Scenario: Suppose we want to count the number of profiles in Reference app and if they are more than 50, the test case must fail.

Procedure: In a combination with Get_Web_Value that counts the profiles and an If command, you can use this command to have the test case fail in case the number or profiles is more than 50. Define a Get_Web_Value step using XPath “count(//a[contains(@href,'profile') and @class='ng-binding'])” with type Number and an If command that compares the variable to less than or equal to 50. Your steps will look like this: