Using Automation Peers to Manipulate UI Elements at Runtime

When performing code-driven UI testing, often you need to manipulate elements in ways that are not possible using the API of the elements themselves. The Button class, for example, does not have a PerformTap method to raise the Tap event. The built-in control classes are generally well encapsulated and are not designed to simulate interaction via code. For this we turn to the Microsoft UI Automation framework, which consists of a secondary API for manipulating UI elements from code. The Automation framework is designed for accessibility software, allowing third-party software to manipulate the UI on behalf of a user with a disability.

The Automation API is able to manipulate elements, ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.