How to identify checkbox ahead treenode with Spy

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
zouyong0229
Posts: 7
Joined: Sat Jan 05, 2013 8:33 am

How to identify checkbox ahead treenode with Spy

Post by zouyong0229 » Mon Jan 28, 2013 4:02 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to identify checkbox ahead treenode with Spy

Post by Support Team » Tue Jan 29, 2013 4:26 pm

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)
.
Image

zouyong0229
Posts: 7
Joined: Sat Jan 05, 2013 8:33 am

Re: How to identify checkbox ahead treenode with Spy

Post by zouyong0229 » Wed Jan 30, 2013 11:49 am

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
Installed Software.png (25.85 KiB) Viewed 1940 times
Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to identify checkbox ahead treenode with Spy

Post by Support Team » Wed Jan 30, 2013 1:51 pm

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)
.
Image

zouyong0229
Posts: 7
Joined: Sat Jan 05, 2013 8:33 am

Re: How to identify checkbox ahead treenode with Spy

Post by zouyong0229 » Fri Feb 01, 2013 10:35 am

Hi,

It worked fine with your method. Thanks a lot.

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Re: How to identify checkbox ahead treenode with Spy

Post by jabelshauser » Tue Apr 23, 2013 9:47 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to identify checkbox ahead treenode with Spy

Post by Support Team » Wed Apr 24, 2013 5:42 pm

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)
.
Image

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Re: How to identify checkbox ahead treenode with Spy

Post by jabelshauser » Thu Apr 25, 2013 7:17 am

also using Selected doesn't work.
Last edited by jabelshauser on Mon Apr 29, 2013 7:15 am, edited 1 time in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to identify checkbox ahead treenode with Spy

Post by Support Team » Fri Apr 26, 2013 2:39 pm

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)
.
Image