TreeItem loses descendants

Bug reports.
vshulman
Posts: 3
Joined: Mon Nov 09, 2009 6:01 pm

TreeItem loses descendants

Post by vshulman » Tue Nov 10, 2009 4:30 pm

Given the following code:

Tree tree = repo.MyForm.Self.FindSingle("/*/*/element[@controlname='Tree']/tree[@accessiblerole='Outline']");

TreeItem root = tree.FindSingle("treeitem[@accessiblename='MyRootNode]");

I find that the TreeItem root has no children or other descendants; even though the same node in the tree itself has all the proper descendants -- please see the attached screenshot.

Thanks,
Victor.
Attachments
Ranorex tree descendants vs child descendants.JPG
Ranorex tree descendants vs child descendants.JPG (109.8 KiB) Viewed 1919 times

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

Re: TreeItem loses descendants

Post by Support Team » Wed Nov 11, 2009 6:10 pm

Sorry, I could not reproduce that problem. I tried reproducing it with Ranorex 2.1.4 and a WinForms TreeView control.

What Ranorex version do you use?
What kind of application is it you automate? Could you provide/attach a snapshot of the tree (see http://www.ranorex.com/support/user-gui ... html#c2072)?

Regards,
Alex
Ranorex Support Team
.
Image

vshulman
Posts: 3
Joined: Mon Nov 09, 2009 6:01 pm

Re: TreeItem loses descendants

Post by vshulman » Thu Nov 12, 2009 7:18 pm

I am using Ranorex version 2.1.4.6779; and the application I am working with is based on Infragistics UI objects -- perhaps, that is the problem?

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

Re: TreeItem loses descendants

Post by Support Team » Fri Nov 13, 2009 12:38 pm

You are correct, it could be the because of how the control is implemented. You can use Ranorex Spy to look at the structure hierarchy of the control. If you still think there is a problem after looking at the control in Ranorex Spy, you could send us a snapshot of your app using the save snapshot functionality of Spy.

http://www.ranorex.com/support/user-gui ... html#c2072

Ron
Ranorex Team
.
Image

User avatar
DirkB
Posts: 19
Joined: Thu Jan 29, 2009 9:53 am

Re: TreeItem loses descendants

Post by DirkB » Wed Jun 16, 2010 3:25 pm

Hi,

I have a common WinForms TreeView which looses Descendants (Ranorex 2.3)
Ranorex.Tree tv1 = getRanorexPath("tree","treeView1");
List<TreeItem> listTI = (List<TreeItem>)tv1.DescendantItems;
foreach (TreeItem TI in listTI)
{
TI.Click();
}
If I select/click Parent TreeItems everything is fine (e.g. 18 Items with correct Text property)
If I select items without childs these items have a Text property == null and cannot be clicked.

By the way: Spy reports correct items in each case.

Regards
Dirk

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

Re: TreeItem loses descendants

Post by Support Team » Wed Jun 16, 2010 3:55 pm

Hi,

I've tried it too with a standard Win Forms tree view and I cannot reproduce your behavior.
Is it possible to post or send ([email protected]) us an example application including this behavior?
What code is inside your method getRanorexPath()?

Regards,
Peter
Ranorex Support Team
.
Image

User avatar
DirkB
Posts: 19
Joined: Thu Jan 29, 2009 9:53 am

Re: TreeItem loses descendants

Post by DirkB » Tue Jun 29, 2010 1:08 pm

Hi Peter,

I try to get a reduced implementation from our customer to let you see what's going on.

The method
String getRanorexPath ()
...
Dictionary<String, String> myDic = guiRepository[activeFormName];
result = [email protected]"/"+myDic[ControlName];
---
has a list to all xpaths within a "activeFormName" and is our own repository.
It returns a simple xpath for further stimulation.

But don't worry - it's not urgent anymore.

Regards
Dirk