次の方法で共有


Installing Windows Automation API 3.0 for enabling CodedUITest on WPF Applications

Note: Cross posted from Rituparna's Blog.

Permalink

If you are using CodedUITest to test WPF applications then installing Windows Automation API 3.0 is a pre-requisite. Without this the virtualized controls in WPF wont be played back correctly and since lot of the WPF controls like ListBox/Datagrid are virtualized by default , this will lead to failures.

Windows automation API is pre-installed on WIN7 and can be installed on Vista/XP as well. This blog has all the details on howto get Windows Automation API 3.0 installed.

In case the machine does not have WAA3.0 code generated on doing action on WPF application will have the following comment

// An update for Windows Automation API 3.0 must be installed to enable automation on Windows Presentation Foundation controls. Please refer https://go.microsoft.com/fwlink/?LinkId=162159 for more information.

Similar comment is displayed in the MTLM UI for viewing recorded action as well.

This  let’s the user know that the recording is not proper and user has to install WAA3.0 and re-record. Also a useful way to identify if the machine actually has Windows Automation API 3.0 installed :)

ciao