Although cuit provides many methods and attributes for controls, some common methods are missing for some controls or for further usability. For example, in winlistitem:
Both app and apptools are listitem, and coded UI test builder can also recognize them. However, we cannot directly obtain the size, type, and datemodified content of APP/apptools.
To this end, Ms experts provide another DLL, which is published on their own blog.
Http://blogs.msdn.com/ B /gautamg/archive/2010/02/19/useful-set-of-utility-functions-for-coded-ui-test.aspx
The classes in the DLL are all in the Microsoft. visualstudio. testtoos. uitesting namespace, And the namespace is referenced by the coded UI test file by default, so we do not need to introduce other namespace.
CodeExample: obtain information about the app listitem.
Winlistitem li = new winlistitem (AUT); <br/> Li. searchproperties. add ("name", "app"); <br/> string [] liinfo = winextensions. getcolumnvalues (LI); <br/> foreach (string info in liinfo) <br/>{< br/> MessageBox. show (Info); <br/>}