cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the check box's state if it's not mappable individually?

SOLVED
Highlighted
Occasional Contributor

How to change the check box's state if it's not mappable individually?

Hi,

 

I want to tick the checkbox with a label. The checkbox is not mapped as an individual object. I tried various methods like 

 

set_IsChecked, set_IsSelected, etc. I am passing a boolean value (true) in order to mark it checked. It's not working. 

 

I have attached a video that will describe the problem.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: How to change the check box's state if it's not mappable individually?

If checkboxes are not  seen in spy then did u added the TreeView class  on the proper TestComplete Object Mapping entry (Tools \ Current Projet Properties) and then access to correct methods/properties ?

 

Normally after that  your check box has the Checked property. And then just check its value and use object

 

Did the label is seen as indiviual object ? If yes u can (dbl)click on it to set/unset the checkbox.

 

If nothing work u can always click on it and then do pixel check (i know this is the very end way ..)

 

Un sourire et ça repart

View solution in original post

3 REPLIES 3
Highlighted
Community Leader

Re: How to change the check box's state if it's not mappable individually?

If checkboxes are not  seen in spy then did u added the TreeView class  on the proper TestComplete Object Mapping entry (Tools \ Current Projet Properties) and then access to correct methods/properties ?

 

Normally after that  your check box has the Checked property. And then just check its value and use object

 

Did the label is seen as indiviual object ? If yes u can (dbl)click on it to set/unset the checkbox.

 

If nothing work u can always click on it and then do pixel check (i know this is the very end way ..)

 

Un sourire et ça repart

View solution in original post

Highlighted
Occasional Contributor

Re: How to change the check box's state if it's not mappable individually?

Thanks for the quick suggestions. I can find the "Header" and it has the "set_IsChecked(boolean)" method which does the job of selecting the checkbox. 

 

Thanks,

H

Highlighted
Community Leader

Re: How to change the check box's state if it's not mappable individually?

Hi,

1) First try to record the script from TestComplete and then check what is automatically generated by TestComplete for you. This is the easiest solution to have "some general idea" how to solve a new thing.


2) In the video you present the "set_IsSelected" method. I'm not sure if this is the right way to do such things. You want to check this check box and check its state, so try to look at its state in the "Properties" tab.

 

3) Also, consider to add "class name" of Your custom object into options:

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/object-map...

 

Hope this may help You!

New Here?
Join us and watch the welcome video:
Top Kudoed Authors