isVisible() → {Promise.<boolean>}
Indicates whether the current element is visible.
Returns:
true if the current element is visible, otherwise false.
-
Type
- Promise.<boolean>
items() → {Promise.<Array.<string>>}
The list of all items contained in this object.
Returns:
a promise that is fulfilled with the list of all items contained in this object.
-
Type
- Promise.<Array.<string>>
location() → {Promise.<Point>}
Returns the object's coordinates relative to the parent window (in pixels), format: {x,y}.
Returns:
a promise that is fulfilled with the object's relative coordinates.
-
Type
- Promise.<Point>
longPress(webLongPressArgsopt) → {Promise.<void>}
Presses and holds this object according to the specified behavior.
Remark: This method is not supported in Internet Explorer.
Parameters:
Name | Type | Attributes | Description |
---|
webLongPressArgs | Object |
<optional>
| Arguments object that defines the behavior of the longPress operation.
PropertiesName | Type | Attributes | Default | Description |
---|
duration | number |
<optional>
|
0.25
| The number of seconds to continue pressing. | location | Location |
<optional>
| | The location where the operation is performed. |
|
Returns:
a promise that is fulfilled after pressing the center of the object or the specified location for the number of seconds defined by the user.
-
Type
- Promise.<void>
name() → {Promise.<string>}
Returns the object's name property.
Returns:
the object's name property.
-
Type
- Promise.<string>
nativeObject() → {Promise.<Object>}
Returns the native application object that is represented by this test object instance,
enabling you to access the native properties and methods provided by that object.
Returns:
a promise that is fulfilled with the native application object that is represented by this test object instance.
-
Type
- Promise.<Object>
outerHTML() → {Promise.<string>}
Returns the object's HTML code and its content.
Returns:
the object's HTML code and its content.
-
Type
- Promise.<string>
outerText() → {Promise.<string>}
Returns the object's text.
Returns:
the object's text.
-
Type
- Promise.<string>
pan(deltaXopt, deltaYopt, webPanArgsopt) → {Promise.<void>}
Performs a pan gesture on this object according to the specified distance parameters.
Remark: This method is not supported in Internet Explorer.
Parameters:
Name | Type | Attributes | Description |
---|
deltaX | number |
<optional>
| The distance moved on the x-axis. |
deltaY | number |
<optional>
| The distance moved on the y-axis. |
webPanArgs | Object |
<optional>
| Arguments object that defines the behavior of the pan operation.
PropertiesName | Type | Attributes | Default | Description |
---|
location | Location |
<optional>
| | The location at which to perform operation. | duration | number |
<optional>
|
0.5
| The number of seconds to perform the pan. |
|
Returns:
a promise that is fulfilled after the pan has occurred.
-
Type
- Promise.<void>
parent() → {*}
Returns the parent test object of this test object. The child object must be obtained using the $ method, otherwise, this method returns null.
Returns:
the parent test object of this test object.
-
Type
- *
pinch(scaleopt, pinchArgsopt) → {Promise.<void>}
Performs a pinch gesture on this object according to the scale or specified behavior.
Remark: This method is not supported in Internet Explorer.
Parameters:
Name | Type | Attributes | Description |
---|
scale | number |
<optional>
| The scale for the pinch gesture. This number is the ratio between the start distance and the end distance between the two touch points used for the pinch. For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm apart, the scale would be 0.5. |
pinchArgs | Object |
<optional>
| Arguments object that defines the behavior of the pinch operation.
PropertiesName | Type | Attributes | Default | Description |
---|
location | Location |
<optional>
| | The location at which to perform the operation. | duration | number |
<optional>
|
1
| The number of seconds to perform the pinch. |
|
Returns:
a promise that is fulfilled after the pinch has occurred.
-
Type
- Promise.<void>
role() → {Promise.<string>}
Returns this object's role property.
Returns:
a promise that is fulfilled with this object's role property.
-
Type
- Promise.<string>
select(value) → {Promise.<void>}
Selects the specified radio button from the radio group, replacing the previous selection.
Parameters:
Name | Type | Description |
---|
value | string
|
number | The radio button to select or its index. |
Returns:
a promise that is fulfilled when the selection is performed.
-
Type
- Promise.<void>
selectedIndex() → {Promise.<number>}
Returns the index of the currently selected item (or null if none is selected).
Returns:
a promise that is fulfilled with the index of the currently selected item (or null if none is selected).
-
Type
- Promise.<number>
selectedItem() → {Promise.<string>}
Returns the currently selected item (or null if none is selected).
Returns:
a promise that is fulfilled with the currently selected item (or null if none is selected).
-
Type
- Promise.<string>
size() → {Promise.<Size>}
Returns the object's size (in pixels).
Returns:
a promise that is fulfilled with the object's size.
-
Type
- Promise.<Size>
snapshot(optionsopt) → {Promise.<string>}
Captures and returns a Base64 representation of this test object.
Parameters:
Name | Type | Attributes | Description |
---|
options | Object |
<optional>
| An options object that defines the image capture preferences.
PropertiesName | Type | Attributes | Default | Description |
---|
format | string |
<optional>
|
"png"
| The format of the image. Possible values: png, bmp. |
|
Returns:
a promise that is fulfilled with the Base64 string of the test object's image.
-
Type
- Promise.<string>
styles() → {Promise.<object>}
Returns a copy of the style collection that is attached to this object.
Returns:
the object keys are the attribute names and the corresponding values are the attribute values.
-
Type
- Promise.<object>
swipe(swipeDirectionopt, webSwipeArgsopt) → {Promise.<void>}
Swipes the object in the specified direction or according to the specified behavior.
Remark: This method is not supported in Internet Explorer.
Parameters:
Name | Type | Attributes | Description |
---|
swipeDirection | SwipeDirection |
<optional>
| The direction of the swipe. |
webSwipeArgs | object |
<optional>
| Arguments object that defines the behavior of the swipe operation.
PropertiesName | Type | Attributes | Default | Description |
---|
location | Location |
<optional>
| | The location where the operation is performed. | duration | number |
<optional>
|
0.25
| The number of seconds to perform the swipe. | distance | number |
<optional>
|
200
| The distance (in pixels) to swipe. |
|
Returns:
a promise that is fulfilled after the swipe has occurred.
-
Type
- Promise.<void>
tagName() → {Promise.<string>}
Returns the object's HTML tag.
Returns:
the object's HTML tag.
-
Type
- Promise.<string>
title() → {Promise.<string>}
Returns the element's title attribute.
Returns:
the element's title attribute.
-
Type
- Promise.<string>
type() → {Promise.<string>}
Returns the type of object as defined in the HTML input tag.
Returns:
a promise that is fulfilled with the type of object as defined in the HTML input tag.
-
Type
- Promise.<string>
verifyImageExists(imageToFind, similarityopt) → {Promise.<Object>}
Checks whether a snapshot of this object contains the supplied image.
Parameters:
Name | Type | Attributes | Description |
---|
imageToFind | string | | A Base64 string representation of the image to look for within the test object's snapshot. |
similarity | number |
<optional>
| The minimum similarity between the two images (as a percentage), above which the find is considered a match. Default = 100. |
Returns:
a promise that is fulfilled with an object representing the point where the image was located, or null if it was not found.
-
Type
- Promise.<Object>
verifyImageMatch(expectedImage, pixelToleranceopt, rgbToleranceopt) → {Promise.<boolean>}
Checks whether a snapshot of this object and the supplied image are a match.
Parameters:
Name | Type | Attributes | Description |
---|
expectedImage | string | | A Base64 string representation of the image to compare to the test object snapshot. |
pixelTolerance | number |
<optional>
| The percentage of pixels that can differ between the two images, and still be considered a match. Default = 0. |
rgbTolerance | number |
<optional>
| The percentage by which the RGB values of the pixels in the two images can differ, and still be considered a match. Default = 0. |
Returns:
a promise that is fulfilled with a boolean representing the comparison result.
-
Type
- Promise.<boolean>
verifyImageMatchWithMask(expectedImage, maskAreaImage, pixelToleranceopt, rgbToleranceopt) → {Promise.<boolean>}
Checks whether a snapshot of this object and the supplied image are a match.
Parameters:
Name | Type | Attributes | Description |
---|
expectedImage | string | | A Base64 string representation of the image to compare to the test object snapshot. |
maskAreaImage | string | | A Base64 string representation of the image mask area to use in the image comparison. |
pixelTolerance | number |
<optional>
| The percentage of pixels that can differ between the two images, and still be considered a match. Default = 0. |
rgbTolerance | number |
<optional>
| The percentage by which the RGB values of the pixels in the two images can differ, and still be considered a match. Default = 0. |
Returns:
a promise that is fulfilled with a boolean representing the comparison result.
-
Type
- Promise.<boolean>
waitUntilEnabled(timeout[opt]) → {Promise.<boolean>}
Waits until this test object becomes enabled or until the specified timeout elapses. This method is useful for synchronizing your test with your application.
Parameters:
Name | Type | Attributes | Description |
---|
timeout | number |
<optional>
| The time (in milliseconds) to wait for the test object to become enabled. |
Returns:
a promise fulfilled with true if test object becomes enabled before the timeout is reached; otherwise, false.
-
Type
- Promise.<boolean>
waitUntilExists(timeout[opt]) → {Promise.<boolean>}
Waits until this test object exists or until the specified timeout elapses. This method is useful for synchronizing your test with your application.
Parameters:
Name | Type | Attributes | Description |
---|
timeout | number |
<optional>
| The time (in seconds) to wait for this object to exist. By default, uses the object synchronization timeout defined in the runtime engine settings. |
Returns:
a promise that is fulfilled with a boolean indicating whether the object exists.
-
Type
- Promise.<boolean>
waitUntilVisible(timeout[opt]) → {Promise.<boolean>}
Waits until this test object becomes visible or the timeout elapses. This method is useful for synchronizing your test with your application.
Parameters:
Name | Type | Attributes | Description |
---|
timeout | number |
<optional>
| The time (in milliseconds) to wait for the test object to become visible. |
Returns:
a promise fulfilled with true if test object becomes visible before the timeout is reached; otherwise, false.
-
Type
- Promise.<boolean>
xpath() → {Promise.<string>}
Returns the path to this object in XPath format. For example: //TR[@id='LeanFT']/*\/INPUT
Returns:
a promise that is fulfilled with the path to this object in XPath format.
-
Type
- Promise.<string>