This is a migrated thread and some comments may be shown as answers.

How to use if else condition code step.

2 Answers 337 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaliy
Top achievements
Rank 1
Vitaliy asked on 11 Aug 2015, 12:50 PM

How to use "My step for condition" in "if else" condition code step?

http://screencast.com/t/YtKRQ94jl8h

2 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 12 Aug 2015, 02:52 PM
Hi Vitaliy,

I am sorry but that's not possible. Our IF ELSE blocks can only use another one of our non-coded verification steps as the IF condition. Further, our non-coded verification steps can only verify some property of some UI element present in the application (or verify an element is no longer present).

To achieve the same effect requires you to implement the entire IF ELSE block in a coded step. One thing you can do in a coded step is call another test using our Test-as-step feature using code like this:

this.ExecuteTest("Subtest.tstest");

This way you don't have to convert all your steps into code. Instead put the contents of the IF and/or ELSE block into a separate test then call it as a sub-test.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Vitaliy
Top achievements
Rank 1
answered on 13 Aug 2015, 08:43 AM

Hi Cody,

Okay, 
Thanks for your reply !

Tags
General Discussions
Asked by
Vitaliy
Top achievements
Rank 1
Answers by
Cody
Telerik team
Vitaliy
Top achievements
Rank 1
Share this question
or