How to Use Conditional Logic: IF/ELSE

  1. Login as Test Manager/Test Engineer.

  2. Select the project from the Projects drop down list.

  3. Navigate to Test Page. Click on Add New Test. Enter Test Name and Test Plan. Click on Create Test.

  4. Click on the Test Name. Click on Record. Record the steps for the test scenario.

  5. To add IF/ELSE condition, click on '+' button from the GTP Extension.

  6. Click on Conditional, select Insert IF option. Click on Elements.

  7. Select the desired element from the web application.

  8. From the GTP Extension, select the Condition for the IF logic; e.g., Element is Present, Element Matches Value, Element is Visible, Element is Clickable, and Element Does Not Contains Value, etc.

  9. Click on OK.

  10. Record the steps for IF condition.

  11. After recording the steps for IF condition, move the GTP Extension cursor below ELSE step.

  12. Record the steps for ELSE condition. Once done, click on Save to record the Test Scenario.

Watch this video on how to use conditional logic: IF/ELSE:

 

Previous:

©2023 GoTestPro. All Rights Reserved.