App reads XML file, which contains definition of MS UI Automation controls and explore them using WPF and MVVM.
Why I created this project here?
- For me: Learn how to do it
- For me: Access from everywhere (e.g. from home and work)
- For me: Store my findings in some safe place
- For others: It will be helpful for those, who are also newbies in WPF and attendant technologies
This is a just sample project I created while learning WPF from scratch. I'm QA, and currently I'm responsible for Automation, including UI automation using MS UI Automation and White framework. To make life easier, I decided to store automation properties of UI controls in XML in the specific format, like below:
<Control id="UniqueId" properties="property1=value1|property2=value2" controltype="UiaControlType" description="Control description" image="ImageName, located in the 'images' folder near XML" />
<!-- More real example -->
<Control id="RunOrDebugTestWindow_OkButton" properties="AutomationId=BTN_OK|Name=OK" controltype="Button" image="RunOrDebugTestWindow_OkButton.png" />
Examples of XMLs, containing repository of MS UI automation properties, can be found in 'Repositories' folder, XSD file is also there.
Another DLL I wrote (which is not part of this project, maybe I'll share it later on) reads the XML, and creates MS UIA Conditions and White's (framework over MS UIA) SearchCriteria's.
When XML became rather big, it became rather hard to work with it. So I decided to develop a simple application, which can read an XML like mine, and show controls and their properties in the more comfortable format, plus some useful features. Here is the result.
I'd like to say, that the reason why I create this app isn't necessity, but I just to learn WPF deeply, and to know, how to work with MVVM light toolkit. So, I will be helpful for those who also don't know from which side to dig out to MVVM light framework. BTW, the main carcass of the app I had written in about 0.5 days.
Technologies / approaches in use
- Visual Studio 2010
- MVVM light toolkit
- Extended WPF Toolkit™ Community Edition
- XSD XML scheme
- Binding to different controls in MVVM way
- Value converters
- Working with Child windows using MVVM light's Messenger
- Recent files menu in MVVM way
- Maybe something else I forgot to mention, a lot of my WPF related findings
- Read XML in the specific format and build a model which represents control with MS UI automation properties
- Display control in Data Grid
- Filter controls
- Display properties of the current selected control using PropertyGrid from Extended WPF Toolkit™ / custom editor
- Filter duplicates (different id by the same set of properties)
- Show count of controls in XML
- Display image linked with control from 'image' attribute
- Copy properties of the current selection in datagrid to clipboard
- Refresh XML (re-import)
- Open folder with XML in Windows explorer and select the file