I am currently testing a .Net 3.0 application with the latest .Net addin and having reasonable amount of success manipulating and accessing data in a WpfGrid. However, I would like to use the FindFirst method to search for specific records (by row). The MSDN site is mostly written from the perspective of application development rather than testing and I am a little 'confused' by the implementation of AutomationElement and AutomationPattern.

The FindFirst method requires 2 arguments - scope and condition - scope being childobjects or descendant objects and condition based on object property.

My first problem is defining the scope. When I use:
WpfWindow("blah").WpfGrid("blah2").AutomationEleme nt.ChildObject
...I get an error regarding the object (although the grid object exists in OR)

Problem 2 is in the condition. I suspect that only boolean returning properties are accepted - e.g. IsEnabled, IsSortable - as I receive errors when using any kind of equality operator. Would this be correct?

Since I have had more success using native methods and properties via WpfGrid("blah2").Object I will probably use some kind of long-winded function using the Items collection to find the record - unless... [img]/images/graemlins/smile.gif[/img]

If anyone has ventured into .Net 3.0 WPF testing and has some advice on the use of AutomationElement or AutomationPattern then I would appreciate hearing it.