Unable to read TreeItem Cells if the TreeItem is not visible

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Unable to read TreeItem Cells if the TreeItem is not visible

Post by Ciege » Thu Jun 04, 2009 7:17 pm

OK, I have written a workaround to expand all TreeItems in a DevExpress Tree (see other thread about not being able to EnsureVisible on a DevExpress TreeItem or Cell).

Now that I have the tree fully expanded I want to read in all the Tree Item Cell data and store it to an array.

However, much like the EnsureVisible issue, if the TreeItem is not currently visible on the page, Ranorex is unable to read in the Cell data. It will only read in the cell data of tree items that are visible on the page.

And, since I cannot use EnsureVisible to make sure the TreeItem is visible on the page I will have to resort to yet another workaround to make sure each tree item is visible on the page before I try to read its data.

This is a kludge and greatly slows down the automation process. The particular Tree I am working on currently has > 100 TreeItem nodes. Other trees in my AUT have more.

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

Post by Support Team » Fri Jun 05, 2009 1:44 pm

Well, that seems to be another flaw in the MSAA support of DevExpress' controls. The cells underneath the list items seem to be created only when the list item is visible.

Like stated in your other forum thread regarding DevExpress controls, one way around that problem is to use the keyboard/mouse to navigate in the tree and check the Visible attribute of the element.

Regards,
Alex
Ranorex Support Team