I have been trying to figure this out for a while so any help would be greatly appreciated. I am using UI Automation in my client to monitor and report on user selection within another application. I got the code working perfectly on Server 2003. On Server 2008 however, the control which I am monitoring is being reported as either an item within a data grid or a list. It's very random and I noticed that if I keep on selecting rows within the control, eventually the control will be reported as a data grid. On server 2003, it was always reported as a data grid and so my code works perfectly.

I am developing in Visual Studio 2010 C#.

Update:

I wanted to mention that I got the same results using the UI Spy tool so the source-code is not relevant in this specific case.

有帮助吗?

解决方案

Depending on several aspects the UltraGrid recreates its handle (sometimes even rather often)... this could mess with how it is perceived by UI automation... I don't think that there is anything you can do about it from outside the target application...

Additional information:

The control in question (Infragistics UltraGrid) does NOT have any support for the Windows/MS UI Automation according to this.

Currently the only automation solution supported is the TestAdvantage product from the same vendor.

Although they seem to be working on adding support for Windows UI automation within the next months...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top