Data Driving Radio Buttons

10 posts, 2 answers
  1. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 09 May 2013 Link to this post

    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. !!!
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 09 May 2013 Link to this post

    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
  3. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 09 May 2013 Link to this post

    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.
  4. Answer
    Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 10 May 2013 Link to this post

    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
  5. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 13 May 2013 Link to this post

    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...?
  6. Answer
    Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 14 May 2013 Link to this post

    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
  7. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 15 May 2013 Link to this post

    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:
  8. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 17 May 2013 Link to this post

    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
  9. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 23 May 2013 Link to this post

    Thank you Boyan, I figured it out myself. My scenario is working fine now, Thanks again...! :)
  10. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 23 May 2013 Link to this post

    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
Back to Top