Data Driving If-Else Loop

4 posts, 0 answers
  1. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 13 May 2013 Link to this post

    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.
  2. Himanshu
    Himanshu avatar
    5 posts
    Member since:
    Oct 2012

    Posted 14 May 2013 Link to this post

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

    Posted 14 May 2013 Link to this post

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

    Posted 14 May 2013 Link to this post

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