Page 1 of 1

How to identify checkbox ahead treenode with Spy

Posted: Mon Jan 28, 2013 4:02 am
by zouyong0229
Hi,

I have a tree control which with an ahead check box on tree node, Ranorex Spy can identify the whole tree and each tree item, but can not identify the check box, my case need to simulate user actions to
check/uncheck the check box during testing. Just like below pic shows:
Image

As the pic show, there is no child belongs to "TreeItem 'ES03 [Host:ES03]' ", If the check box is a child
of "TreeItem 'ES03 [Host:ES03]' ", I can use find() to get it then do action on it.

I read the topic:
http://www.ranorex.com/forum/how-to-ide ... t4162.html

I tried Windows Inspect Tool and get below result:
Image


Capture screenshot rxsnp file:
http://www.ranorex.com/forum/download/f ... ew&id=1506

Thanks a lot.

Ranorex version: 4.0
OS version: Win Server 2008 R2
AUT: MMC Application, developing with winForm technology

Re: How to identify checkbox ahead treenode with Spy

Posted: Tue Jan 29, 2013 4:26 pm
by Support Team
Hello,

According to your snapshot, you are using .NET Framework 2.0.
Could you please install .NET Framework 4.0 and track your check-box again?
You could download .NET Framework from MSDN.

Regards,
Markus (T)

Re: How to identify checkbox ahead treenode with Spy

Posted: Wed Jan 30, 2013 11:49 am
by zouyong0229
Hi,

Thanks your reply, I only installed .NET Framework 4.5 not 2.0, So I think I used 4.5 not 2.0,
seems it's not due to the version of .NET Framework.

Ranorex has compatible issue on .NET Framework ? Ranorex 4.0 supports NET Framework 4.5?

Do I need to install the same .NET Framework as the AUT used when developing ? From my understand
It's not necessary to do as this.

Seems that there is no way to bind a specified .NET Framework version on Ranorex Spy.
If multiple .NET Framework installed on one machine, which version Ranorex Spy will use.

Please check installed software list of my machine:
Installed Software.png
Thanks.

Re: How to identify checkbox ahead treenode with Spy

Posted: Wed Jan 30, 2013 1:51 pm
by Support Team
Hello,

Thank you for your snapshot.

If you are using Ranorex Studio, you need to have .NET Framework 3.5 SP1 installed (as a prerequisite).
The .NET Framework 3.5 is not shown since you have already installed .NET Framework 4.5.
No need to install the same .NET Framework as your AUT.

There is no special CheckBox item in your application since it is a TreeItem.
Nevertheless, you could use a mouse-click on the box besides the TreeItem using the recorder.
This would add a mouse-click action with a relative location (e.g. -30, 14) to your recording.

Please give it a try.

Regards,
Markus (T)

Re: How to identify checkbox ahead treenode with Spy

Posted: Fri Feb 01, 2013 10:35 am
by zouyong0229
Hi,

It worked fine with your method. Thanks a lot.

Re: How to identify checkbox ahead treenode with Spy

Posted: Tue Apr 23, 2013 9:47 am
by jabelshauser
i have the same problem, but i want additionaly read if the checkbox is checked or not.

My Questions:
- TreeItem.Checked is not comprehensible, in my treeview it is always false, regardless if checkbox is
checked or not, or selected, or what else
- The obsolete TreeView had the capapbility to do that (TreeView.IsItemchecked)
Is there no replacement ?

Thanks in advance
Jörg

Re: How to identify checkbox ahead treenode with Spy

Posted: Wed Apr 24, 2013 5:42 pm
by Support Team
Hello,

Could you please try to use Selected instead of Checked on your TreeItem?

If this is not working in your case, could you please send us ([email protected])
or post a Ranorex Snapshot of your application in order to analyze it?
Please take a look at Creating Ranorex Snapshot Files in our User Guide.

Thank you in advance.

Regards,
Markus (T)

Re: How to identify checkbox ahead treenode with Spy

Posted: Thu Apr 25, 2013 7:17 am
by jabelshauser
also using Selected doesn't work.

Re: How to identify checkbox ahead treenode with Spy

Posted: Fri Apr 26, 2013 2:39 pm
by Support Team
Hello,

Thank you for posting your snapshot.

The CheckBox and the TreeItem are two different elements.
Unfortunately, the CheckBox is not shown in Spy.
Therefore, TreeItem.Checked or TreeItem.Selected does not work.

Could you please try to find these elements with Microsoft Inspect?
If not, it seems that these are custom controls and that Ranorex is therefore not able to identify them.

Thank you in advance.

Regards,
Markus (T)