Checkbox Action

4 posts, 2 answers
  1. Aswin
    Aswin avatar
    5 posts
    Member since:
    Dec 2012

    Posted 20 Mar 2013 Link to this post

    Hi, My test scenario includes checking of few Checkboxes. I want the test to turn on (Check) the listed Checkboxes only if they are unchecked. Because sometimes, the test is unchecking the checkboxes and I don't wan such thing to happen. Can I make it happen in Test. Thanks in advance.
  2. Answer
    Himanshu
    Himanshu avatar
    5 posts
    Member since:
    Oct 2012

    Posted 20 Mar 2013 Link to this post

    Hi Aswin

    Seems you are using click to check or uncheck the check-box. Rather use the "Check < Check-box Object> to be 'True'" to set the check-box as set.
    U get get this step by adding the check-box object to element explorer and use step suggestions on that element. This way, if the check-box is already checked, it wont uncheck it.

    Though this is the simpler way, still another way to go about is to use a for statement. Use the validation, "Checked Value is 'False'" on your element. If it returns true, click on it to set it else do nothing.

    Hope it helps.
  3. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 25 Mar 2013 Link to this post

    Hello Aswin,

    Please try Himanshu's suggestion and let us know if this works for you. Also please see this video for more information on how to verify the state of the checkbox using a logical If/Else step.

    @Himanshu. I've updated your Telerik Points for assisting another customer.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  4. Aswin
    Aswin avatar
    5 posts
    Member since:
    Dec 2012

    Posted 26 Mar 2013 Link to this post

    Thank you very much Himanshu and Plamen. It works perfectly Now... :)
Back to Top