UIAutomation sample project — WPF, WinForm, UIA, ServerSideProvider, Timing, WaitForReady, DataBinding

Related reading:





Based on my UI Automation test experience, I created a sample project. In the project, it contains:

1.       WPF as test target.

2.       WinForm as a test target.

3.       Test code to Automate WPF and WinForm.

4.       Test code to Automate calc.exe for Win7.

5.       A simple Test Framework.

It demonstrates:

1.       Basic usage of UIA, like UI element probing with AutomationID, Name property. UIA pattern usage.

2.       How to set AutomationID for databinding item in WPF.

3.       Use Sleep, polling and event to deal with timing issue.

4.       Use Waiter Pattern to simplify the timing solution.

5.       Basic implementation of WaitForReady.

6.       Click and Invoke.

7.       Concept of UI Test Framework.

8.       Use AutomationPeer to implemente InvokePattern for self-draw WPF control.

9.       Implement Server side provider for WinForm.

The following interface/class is demostrated:

AutomationElement, WindowPattern, CacheRequest, SendInput, InvokePattern, ValuePattern, UserControlAutomationPeer, AutomationPeer, IRawElementProviderSimple, RaiseAutomationPropertyChangedEvent, ReturnRawElementProvider, ProviderOptions, HostProviderFromHandle



Comments (2)

  1. XYZ says:

    I am not able to open the zip and all files within this.

  2. Li Xiong says:

    the link is fixed. thanks.

Skip to main content