Skip to content

Helps make creating PropertyConditions with Microsoft's UIA Framework less painful and more strongly typed.

License

Notifications You must be signed in to change notification settings

Frannsoft/msuia-propertycondition-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PropertyCondition wrapper for Microsoft's UI Automation Framework

Helps make creating PropertyConditions with Microsoft's UIA Framework less painful and more strongly typed.

NuGet Package

What it does


Normally, when using the raw MS UIA Framework creating a PropertyCondition to find elements on the screen looks like this:

PropertyCondition myCondition = new PropertyCondition(AutomationElement.AutomationId, "myautomationId");

PropertyCondition's constructor takes an AutomationProperty and the value being tested against when searching as just an object type. At runtime an exception will be thrown if the type of the value being tested is not the expected type.

This wrapper helps alleviate that pain by creating stronger typing around the value under test.

Here's an example:

PropertyCondition myCondition = ConditionFactory.AutomationId.WithValue("myAutomationId");

and another:

PropertyCondition myCondition = ConditionFactory.ControlType.WithValue(ControlType.Button);

Now you don't need to know what Type is necessary in your brain. For full list of all supported AutomationProperty types look here


This lib was built with .NET 4.5 in mind.

About

Helps make creating PropertyConditions with Microsoft's UIA Framework less painful and more strongly typed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages