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

CheckBox is not selected in Recorded step.

3 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chandrakant
Top achievements
Rank 1
Chandrakant asked on 16 Jul 2012, 08:45 AM
In recored step the selection of check is showing.but actually value of checkbox selection is not passing to server.
when same thing doing manually it work fine.how to write code for checking checkbox in c#.

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 16 Jul 2012, 09:45 AM
Hello Chandrakant,

This sound like a javascript event issue. Probably the underlying "onclick" javascript is not being triggered for the checkbox. Ensure the "InvokeOnClick" property is set to True for the "Check" step (see screenshot).
  
If it is and the javascript isn't triggering, you might try disabling that step and recording a Desktop Left Mouse click step on the checkbox instead from the Mouse Actions option on the Elements Menu.
 
If you prefer to use coded step for checking the checkbox and triggering the event, please see this article for a sample code.  

Kind regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chandrakant
Top achievements
Rank 1
answered on 16 Jul 2012, 11:35 AM
Thank you.But coded step is not working for checkbox check.
0
Plamen
Telerik team
answered on 16 Jul 2012, 04:48 PM
Hi Chandrakant,

There is no need to use coded step for such simple action that can be easily done via the UI. However, I have recorded this short video just to demonstrate how the coded step works against this demo site. Note that I'm using almost exactly the same code seen in the article. The only difference is the checkbox ID.  

Also, please let me know whether the suggested non-coded solution works. Were you able to resolve the issue by setting the "InvokeOnClick" property to True?  

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Chandrakant
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Chandrakant
Top achievements
Rank 1
Share this question
or