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

Data Driving Radio Buttons

9 Answers 160 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aswin
Top achievements
Rank 2
Aswin asked on 09 May 2013, 05:07 AM
Hi, I've a scenario to to click some radio buttons (Yes/No). I want to data drive them using Excel sheet.

If there are 5 radio buttons, My Excel will contain 5 columns with Yes or No. And 10 rows. For each run, the Yes/No will vary in the columns. Can anyone please help me in regard of this. Thanks. !!!

9 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 09 May 2013, 08:55 AM
Hi Aswin,

You should use True/False instead of Yes/No and simply data bind the radio buttons to column.

I recorded a video which demonstrates it. 

Let me know if you need further assistance.

Greetings,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Aswin
Top achievements
Rank 2
answered on 09 May 2013, 12:24 PM
Thanks ! That was really useful. But how do I add the step "Check xxx to be true". When I record, I'm getting "Click on xxxButton" only. And I am not sure whether it is verification step (Since it was marked as Yellow thunder, verification steps will be in Green).

Make me more clear please. Thanks !

Note: I'm working on Silverlight Platform.
0
Accepted
Boyan Boev
Telerik team
answered on 10 May 2013, 01:31 PM
Hi Aswin,

Thank you for the clarification. Every action in Silverlight is a real action (that means that it affects the browser in the same way that a real user would affect the browser) therefore Test Studio is not recording "Check to be true". 

The only way to databound the radio buttons is via a coded step.

if(Data["Male"].ToString()=="True") Pages.RadioButtonSample.FrameContent.SilverlightApp.TopButtonRadiobutton.Check(true);
else
{
                Log.WriteLine("Male is False");
}

This will check the radio button if the "Male" column is True.

Here is a demonstration video.

Hope this helps.

Kind regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Aswin
Top achievements
Rank 2
answered on 13 May 2013, 09:56 AM
Thanks for the reply. But I'm not very familiar in Coded Steps. Can I get some detailed videos or links so that I can grasp...?
0
Accepted
Boyan Boev
Telerik team
answered on 14 May 2013, 11:30 AM
Hi Aswin,

I am attaching a video which demonstrates the entire process from scratch. 

Another very good source is our TV section.

Let me know if you need further assitance.

Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Aswin
Top achievements
Rank 2
answered on 15 May 2013, 12:02 PM
Thank you very much. That do explains a lot.

But how do I save a Script step. And whenever I change the description of Coded step, Test studio is getting crashed. I don't think it is a problem with my Computer or my way of recording. Please help me sorting this thing out.

Herewith I'm attaching my Log:
0
Boyan Boev
Telerik team
answered on 17 May 2013, 08:08 AM
Hi Aswin,

The log says that there is some compile error (i.e. there is some syntax error in the code). 

Please send us the test project or a screen shot of the coded step so we can investigate where the issue is.

Regarding the crashing of Test Studio I was not able to reproduce such a behavior. Please clear the application log, reproduce the issue and send us a copy of the log.

Hope to hear from you soon.
 

Greetings,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Aswin
Top achievements
Rank 2
answered on 23 May 2013, 07:20 AM
Thank you Boyan, I figured it out myself. My scenario is working fine now, Thanks again...! :)
0
Boyan Boev
Telerik team
answered on 23 May 2013, 11:37 AM
Hello Aswin,

I am glad you've managed to fix the issue you are experiencing.

Please don't hesitate if you have additional questions.  

Regards,
Boyan Boev
Telerik
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
Boyan Boev
Telerik team
Aswin
Top achievements
Rank 2
Share this question
or