Page 1 of 1

Ranorex.Table.Rows and MSAA Events

Posted: Thu Feb 04, 2010 1:50 pm
by atom
Hiya

We're implementing MSAA for a heirarchical tree grid control
Each row is exposed with accessible state = Expanded or Collapsed, and with a accessible default action to either expand or collapse. We didnt implement any MSAA events

My question is when i use ranorex to expand a row, ranorex isn't re-querying the Row to find its new accessible state (of Expanded)

Does accessing the Table.Rows collection force a refresh, or will searching for the Row using an RxPath, force a refresh?

Regards

Re: Ranorex.Table.Rows and MSAA Events

Posted: Thu Feb 04, 2010 5:59 pm
by Support Team
When you have an element instance (e.g. of role Row) and get an attribute from that element, Ranorex will always retrieve the up-to-date value (unless you have CacheSessionContext wrapped around the corresponding code). So, whenever you access the AccessibleState attribute of your row element, Ranorex should return the actual value returned by the underlying MSAA object.
atom wrote:My question is when i use ranorex to expand a row, ranorex isn't re-querying the Row to find its new accessible state (of Expanded)
Ranorex does not need to search for that row again, but it communicates with the MSAA object corresponding to that row directly and retrieves the up-to-date value of the accessible state.
atom wrote:Does accessing the Table.Rows collection force a refresh, or will searching for the Row using an RxPath, force a refresh?
Getting the Table.Rows collection will always try to get the underlying MSAA elements of the rows again from the AUT (unless there is a CacheSessionContext). However, you should not need that to get an up-to-date value of an attribute.

Regards,
Alex
Ranorex Support Team

Re: Ranorex.Table.Rows and MSAA Events

Posted: Thu Feb 04, 2010 6:13 pm
by atom
Hiya

Thanks for answer, its just I dont see this happening from Spy tool
When I expand a Row, and in Spy click Refresh it doesnt update, but when I close and re-open Spy its updated

Cheers

Re: Ranorex.Table.Rows and MSAA Events

Posted: Thu Feb 04, 2010 6:41 pm
by Support Team
atom wrote:When I expand a Row, and in Spy click Refresh it doesnt update, but when I close and re-open Spy its updated
That's very weird, clicking the "Refresh" button usually updates the whole element tree. So that should even update changes in the element hierarchy. That means, "Refresh" should have the same effect as closing and reopening Spy.
Please, try right clicking on a row element and select "Update Element Data", that should update all the attribute values shown in Ranorex Spy!

The only way "Refresh" could fail is that your MSAA implementation always creates a new MSAA object whenever an attribute fails, but that would be a rather "unusual" (not to say "wrong") implementation.

Regards,
Alex
Ranorex Support Team