TestProject Forum
Powered by leading experts in the test automation community

Validating text with if else

How do I validate text with an if-else loop for a recorded data-driven test?
For example:
Test scenario 1 for input data in row 1: on click continue, should continue to the next screen and the expected text present should contain “ABC” then it passes.
Test scenario 2 for input data in row 2: on click continue, should not continue to the next screen and the expected text present should contain “XYZ” then it passes.
The validation is on the expected text.
Thank you.

If you can wait for a week if else logic will be added to the recorder.
If you don’t want to wait you can put one of the scenarios in your test and create another test with the steps of the second scenario. In the step of the click on Continue add Failure behavior Recovery Test and put the second test as parameter.

Thank you very much for your reply. I can wait for that if-else logic.

Hello, we have added the condition feature which you can achieve if else statements.
https://intercom.help/testprojectio/en/articles/3788681-if-else-logic

Thank you very much!

Melinda