cancel
Showing results for 
Search instead for 
Did you mean: 

How to select checkbox present under treeView

SOLVED
Highlighted
Contributor

How to select checkbox present under treeView

Hi,

Please refer attached snapshot treeView.png

Observe that tree has checkbox for each Item and to select item one need to check corresponding checkbox.

How to select such checkbox in Test Complete.

 

I tried 

TreeViewFeature.wItems.Item(0).Check()

But got Error: Invalid number of parameters.

 

If select using Items option it click on name correspoding to checkbox, which does not check the checkbox; ie selecting name of checkbox does not check checkbox. 

 

How to check such checkbox.

 

Regards,

Rushikesh Kadam

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: How to select checkbox present under treeView

Invalid number of parameters simply means that, in your code, you haven't properly implented it.  I don't know this specific control but does the "Check" method take a boolean parameter?  What does "Object SPy" show when you try and examine the checkbox, if possible?  Have you tried recording what you're intending to do to see how TestComplete recognizes it?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
2 REPLIES 2
Community Hero

Re: How to select checkbox present under treeView

Invalid number of parameters simply means that, in your code, you haven't properly implented it.  I don't know this specific control but does the "Check" method take a boolean parameter?  What does "Object SPy" show when you try and examine the checkbox, if possible?  Have you tried recording what you're intending to do to see how TestComplete recognizes it?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: How to select checkbox present under treeView

@tristaanogre 

I checked again and found that check method does not take boolean parameters. I used "cbChecked" instead and it worked.

Thank you for pointing it out.

New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win