This project is read-only.

Introduction

Automation elements now support a dynamic object model. This means that if an element support pattern N, it also exposes properties and method for the pattern N.
Properties provides us with read-only information.
If a method does not return string or other information, it returns the object it was called on, i.e. supports chaining or pipelining ('chaining methods' is a term used in several staticly-typed languages, for example, C#. As a reference to terms 'chaining' and 'pipelining' you may look in this Skeet's book):
(Start-Process calc -PassThru | Get-UiaWindow | Get-UiaButton 1).Invoke().NavigateToNextSibling().Invoke().Highlight();
Microsoft provides a map of patterns to control types. However, accordingly to my observation, situations when a control supports all recommended patterns are rare, especially if a software under test is from a 3rd party vendor.
This is cured partially by attaching Click methods to elements.

Common interfaces

Automation elements always support three interfaces:
ISupportsNavigation
ISupportsHighlighter
ISupportsControlPattern
ISupportsConversion TBD
ISupportsExport TBD
ISupportsRefresh
Notice that clicks are available whether or not the element really supports InvokePattern.

Specific interfaces

ISupportsDockPattern
ISupportsExpandCollapsePattern
ISupportsGridItemPattern
ISupportsGridPattern
ISupportsInvokePattern
ISupportsRangeValuePattern
ISupportsScrollItemPattern
ISupportsScrollPattern
ISupportsSelectionItemPattern
ISupportsSelectionPattern
ISupportsTableItemPattern
ISupportsTablePattern
ISupportsTextPattern
ISupportsTogglePattern
ISupportsTransformPattern
ISupportsValuePattern
ISupportsWindowPattern

Integrated search

Common information about integrated searches
the Children property TBD
the Descendants property

Input simulation

Common information about input simulation TBD
the Control property
the Keyboard property
the Mouse property
the Touch property TBD

Last edited Feb 10, 2014 at 4:31 PM by apetrovskiy, version 33

Comments

No comments yet.