class sap.ui.test.matchers.Properties

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/ui/test/matchers/Properties
Application Component: CA-UI5-TA

Checks if a control's properties have the provided values - all properties have to match their values.

As of version 1.72, it is available as a declarative matcher with the following syntax:

{
    properties: {
        propertyName: "propertyValue"
    }
}
As of version 1.74, you can use regular expressions in declarative syntax:
{
    properties: {
        propertyName: {
            regex: {
                source: "propertyValue$",
                flags: "ig"
            }
        }
    }
}


Constructor

new sap.ui.test.matchers.Properties(oProperties)
Param Type Default Value Description
oProperties object

the object with the properties to be checked. Example:

// Would filter for an enabled control with the text "Accept".
new Properties({
    // The property text has the exact value "Accept"
    text: "Accept",
    // The property enabled also has to be true
    enabled: true
})
If the value is a RegExp, it tests the RegExp with the value. RegExp only works with string properties.