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

Data Driving If-Else Loop

3 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aswin
Top achievements
Rank 2
Aswin asked on 13 May 2013, 10:17 AM
I have a scenario in Silverlight platform to click some Radio buttons and loop them for various runs.

Can I Data Drive a If-Else loop with verification from Excel file, such as It has Sex, Marital Status, Children Columns with True/False value. I need Test Studio to check the value in Excel cell before clicking every radio button.

P.S: Coded steps makes me very confused. Please help me achieving the same in Ordinary manner.

Thanks a lot mates.

3 Answers, 1 is accepted

Sort by
0
Himanshu
Top achievements
Rank 2
answered on 14 May 2013, 12:38 PM
Hi Aswin

If i understand your problem correctly, you want to trigger radio buttons as selected or unselected as per data in excel sheet. If thats the case, its a simple scenario where you wont require If-Else.

When you record a radio button step, the step that gets recorded is "Check ____ radio button to be True/False".
This step can be data binded to the excel having values "true" for the one's you want to set and "False" for the one's you want to unset.

So record the step for all the radio buttons and data bind it with the respected columns. Now the buttons with true will be set and the buttons with false value wont be set.

Hope It Helps.
0
Aswin
Top achievements
Rank 2
answered on 14 May 2013, 01:01 PM
Thank you for the reply Himanshu. But the problem in Silverlight is, when I record an action of clicking a Radio button it records as follows:

"Click on GenderMaleRadiobutton" and not as "Check GenderMaleRadioButton to be True/False" as you specify.

So that I am unable to build verification or data-drive it using GUI. I'm gonna try Coded steps as advised to me in another forum post. Thank you once again and please update this post if you come across any other possible solution in "Silverlight" scenario.
0
Boyan Boev
Telerik team
answered on 14 May 2013, 01:18 PM
Hello Aswin,

Since this is a duplicate of your public forum post, let's continue the discussion there.

All the best,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Aswin
Top achievements
Rank 2
Answers by
Himanshu
Top achievements
Rank 2
Aswin
Top achievements
Rank 2
Boyan Boev
Telerik team
Share this question
or