UI Spy misreporting the UI heirarchy for our App.

If I view a Table object (Infragistics) with UI Spy, it lists the rows as expected. However, when I use the Treewalker and navigate down to the Table object, the rows do not exist where they do in the UI Spy.

If I use the parent windows AutomationElement and use the Findfirst() method using the NameProperty as a condition, the findfirst method never returns. It doesn't crash or return null either, it just runs indefinitely. (I let it sit there overnight once.)

Here's the odd thing: If the application is NOT the foreground application, the TreeWalker CAN navigate to the row(s) and work with them as expected. And FindFirst can too. Anyone have any ideas?

Here's my code - seems pretty simple:
AutomationElement LTGrid = TW.GetFirstChild(AUTWindow); // Gets Table element
LTGrid = TW.GetFirstChild(LTGrid); // Should get first row of Table (does not)

[874 byte] By [JustSumGuy] at [2008-3-5]
# 1
Can you post a little more code, in particular to show how you are creating the condition and TW? Thanks.
PeterDonnelly-MSFTUE at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...
# 2
So the problem has gone away now that I uninstalled the RC build of .net 3.0 and installed the RTM version of .net 3.0, and SDK 3.0. Now the Infragistics table object does not have any children listed in the UI Spy, or using the Treewalker.
This of course will make it impossible to interact with the table in any meaningful way.

Strange.

JustSumGuy at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...
# 3

It's possible they've changed their automation implementation in a more recent release.

If possible, please contact them directly.

KevinMoore-MSFT at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...
# 4
All the Infragistics WPF controls (including the DataPresenter) will definitely have support for UI Automation in the V1 release. Please contact the Infragistics TAP coordinator to find out when you can expect a CTP build with this functionality. Hope this helps.
AvalonBliss at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...

Software Development for Windows Vista

Site Classified