The condition you pass to these actions can be a UIAutomation2 locator or a condition object. Let's take a look at a few examples.

UIAutomation2 Locator

[
    {
        "property": "ControlType",
        "value": "Button"
    },
    {
        "property": "Name",
        "value": "5"
    },
    {
        "property": "AutomationId",
        "value": "135"
    }
];

Note: if Name is set then AutomationId is not used.

Location Object

{
    type:"And",
    nested: [
        {
            type: "Property",
            name: "AutomationElementIdentifiers.ControlTypeProperty",
            value: "Button"
        },
        {
            type: "Property",
            name: "AutomationElementIdentifiers.NameProperty",
            value: "5"
        }
    ]
}

This is a more flexible method. it supports And, Or and Not conditions that can be nested into each other. Also any property you see in UI Automation Spy can be used.

Here is another example:

{
    type:"Or",
    nested: [
        {
            type: "Property",
            name: "AutomationElementIdentifiers.NameProperty",
            value: "4"
        },
        {
            type: "Property",
            name: "AutomationElementIdentifiers.NameProperty",
            value: "5"
        },
        {
            type: "Property",
            name: "AutomationElementIdentifiers.NameProperty",
            value: "clear",
            ignoreCase: true
        }			
    ]
}