Record-and-replay implementation for OPA5.
Method | Description |
---|---|
sap.ui.test.RecordReplay.extend |
Creates a new subclass of class sap.ui.test.RecordReplay with name
|
sap.ui.test.RecordReplay.findAllDOMElementsByControlSelector |
Find DOM element representations of all controls specified by a selector object. Useful when the selector matches multiple controls and you want all the results. |
sap.ui.test.RecordReplay.findControlSelectorByDOMElement |
Find the best control selector for a DOM element. A selector uniquely represents a single element. The 'best' selector is the one with which it is most likely to uniquely identify a control with the least possible inspection of the control tree. |
sap.ui.test.RecordReplay.findDOMElementByControlSelector |
Find DOM element representation of a control specified by a selector object. |
sap.ui.test.RecordReplay.getMetadata |
Returns a metadata object for class sap.ui.test.RecordReplay. |
sap.ui.test.RecordReplay.interactWithControl |
Interact with specific control. |
sap.ui.test.RecordReplay.waitForUI5 |
Wait for UI5 to complete processing, poll until all asynchronous work is finished, or timeout. |
Creates a new subclass of class sap.ui.test.RecordReplay 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.Object.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Find DOM element representations of all controls specified by a selector object. Useful when the selector matches multiple controls and you want all the results.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
Options for the search |
|
selector | sap.ui.test.RecordReplay.ControlSelector |
Control selector for this control Could be the result of sap.ui.test.RecordReplay.findControlSelectorByDOMElement If the selector matches multiple controls, all of their representations will be included in the result. If the selector contains ID suffix for a DOM element, the result will include the first DOM element with a matching ID (one DOM element per control). Otherwise, the result will include the first DOM element with ID matching the control's ID, or the DOM element that usually receives focus events (one DOM element per control). |
Find the best control selector for a DOM element. A selector uniquely represents a single element. The 'best' selector is the one with which it is most likely to uniquely identify a control with the least possible inspection of the control tree.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
Options to influence the generation of the selector |
|
domElement | Element |
DOM element that was pointed out by the user |
|
settings | object |
preferences for the selector e.g. which is the most prefered strategy |
|
preferViewId | boolean |
true if selectors with view ID should have higher priority than selectors with global ID. Default value is false. If one selector is requested, and there are two valid selectors - with view ID and global ID, the one with view ID should be returned. |
Find DOM element representation of a control specified by a selector object.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
Options for the search |
|
selector | sap.ui.test.RecordReplay.ControlSelector |
Control selector for this control Could be the result of sap.ui.test.RecordReplay.findControlSelectorByDOMElement If the selector matches multiple controls, only the first one will be used If the selector contains ID suffix for a DOM element, the 'first' relevant DOM element will be located Otherwise, the result will be the 'first' DOM element with ID matching the control's or the one that usually receives focus events |
Interact with specific control.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
Options for the interaction |
|
selector | Object |
control selector for the control to interact with The returned promise will be rejected if the control is not specified or does not have a DOM reference |
|
interactionType | sap.ui.test.RecordReplay.InteractionType |
Interaction type; Currently supported interaction types are sap.ui.test.RecordReplay.InteractionType To see the interaction details and options, see sap.ui.test.actions |
|
enterText | string |
Text for the EnterText interaction |
|
clearTextFirst | string | true |
Clear existing text before interaction |
Wait for UI5 to complete processing, poll until all asynchronous work is finished, or timeout.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
Override default wait options like polling timeout and interval |
|
timeout | int | 15000 |
Time in milliseconds to wait until processing is complete |
interval | int | 400 |
Time in milliseconds to wait between checks |