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

Checkbox Action

3 Answers 237 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aswin
Top achievements
Rank 2
Aswin asked on 20 Mar 2013, 09:20 AM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Himanshu
Top achievements
Rank 2
answered on 20 Mar 2013, 10:06 AM
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.
0
Accepted
Plamen
Telerik team
answered on 25 Mar 2013, 12:51 PM
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
0
Aswin
Top achievements
Rank 2
answered on 26 Mar 2013, 06:27 AM
Thank you very much Himanshu and Plamen. It works perfectly Now... :)
Tags
General Discussions
Asked by
Aswin
Top achievements
Rank 2
Answers by
Himanshu
Top achievements
Rank 2
Plamen
Telerik team
Aswin
Top achievements
Rank 2
Share this question
or