Abstract Class sap.ui.test.actions.ActionModule: sap/ui/test/actions/Action

known direct subclasses: EnterText, Press

Actions for Opa5 - needs to implement an executeOn function that should simulate a user interaction on a control


Since: 1.34.
Constructor Summary
new sap.ui.test.actions.Action()Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.
Method Summary
sap.ui.test.actions.Action.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.test.actions.Action with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.test.actions.Action.getMetadata()Returns a metadata object for class sap.ui.test.actions.Action.
executeOn(element)Checks if the matcher is matching - will get an instance of sap.ui.Control as parameter Should be overwritten by subclasses
getIdSuffix()Gets current value of property idSuffix.
setIdSuffix(sIdSuffix)Sets a new value for property idSuffix.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.test.actions.Action()

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.base.ManagedObject can be used as well.

Method Detail
sap.ui.test.actions.Action.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.test.actions.Action with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.base.ManagedObject.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.test.actions.Action.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.test.actions.Action.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
executeOn(element)
Checks if the matcher is matching - will get an instance of sap.ui.Control as parameter Should be overwritten by subclasses
Parameters:
{sap.ui.core.Control}element the sap.ui.core.Element or a control (extends element) the action will be executed on
getIdSuffix(): string
Gets current value of property idSuffix.
Since:
1.38 Use this only if the target property or the default of the action does not work for your control. The id suffix of the DOM Element the press action will be executed on. For most of the controls you do not have to specify this, since the Control Adapters will find the correct DOM Element. But some controls have multiple DOM elements that could be target of your Action. Then you should set this property. For a detailed documentation of the suffix see {@link sap.ui.core.Element#$}
Returns:
{string} Value of property idSuffix
setIdSuffix(sIdSuffix): sap.ui.test.actions.Action
Sets a new value for property idSuffix.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sIdSuffix New value for property idSuffix
Since:
1.38 Use this only if the target property or the default of the action does not work for your control. The id suffix of the DOM Element the press action will be executed on. For most of the controls you do not have to specify this, since the Control Adapters will find the correct DOM Element. But some controls have multiple DOM elements that could be target of your Action. Then you should set this property. For a detailed documentation of the suffix see {@link sap.ui.core.Element#$}
Returns:
{sap.ui.test.actions.Action} Reference to this in order to allow method chaining