Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

These actions are available when working with the Android application testing only.


Select

This action selects the specified radio button.

This action does not have any input parameters. 

Example:

Select

Anchor
_Toc472359921
_Toc472359921
SelectByIndex

This action selects the specified radio button based on its index number. The indexes start from 1. This action is to be used only when radio button is part of a radio-group and group has a valid resource ID on Android.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

groupName

Resource ID of the radio group

Yes

 String

Index

Index of the radio button in the radio group. Index starts at 1

No

String

Example:

SelectByIndex              "com.sample.app:id/radiogroup1"         "2"

On this page:

Table of Contents
maxLevel2
minLevel2
absoluteUrltrue

IsSelected

This action verifies whether the radio button is selected or deselected.

If radio button is selected and state is "true", result is success. If radio button is selected and state is "false" result is failure.

If radio button is not selected and state is "true", result is failure. If radio button is not selected and state is "false" result is success.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

State

Value of this parameter can be true or false.
If True – checks if the radio button is selected
If False – checks if the radio button is not selected

No

String

Example:
IsSelected                    "TRUE"

Anchor
_Toc472359923
_Toc472359923
SelectIfTrue

This action selects the radio button if parameter passed is TRUE.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

Select

Value of this parameter can be true or false.
If True – Selects the radio button
If False – Does not select the radio button

No

String

Example:
SelectIfTrue                        "TRUE"

Anchor
_Toc472359924
_Toc472359924
Click

This action clicks the specified object.

This action does not have any input parameters. 

Example:

Click

Anchor
_Toc472359925
_Toc472359925
LongPress

This action performs the long press event on the specified object. 

This action does not have any input parameters.

Example:
LongPress

Anchor
_Toc472359926
_Toc472359926
Swipe

This action performs swipe and finds object until timeout occurs.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

upDownLeftRight

Direction of Swipe

  • Up: Move finger from down to up on the device screen.
  • Down: Move finger from up to down on the device screen.
  • Left: Move finger from right to left on the device screen.
  • Right: Move finger from left to right on the device screen.

No

String

timeoutInSeconds

Enter the timeout in seconds to perform swipe.

No

String

swipePageInSeconds

Enter in how many seconds one page should be swiped. Default is 1 second.

Note: Use this parameter with caution only when control on swipe speed is required.

No

String


Example:

Swipe                  "up"                   "10"             "1"

Anchor
_Toc472359927
_Toc472359927
StoreExistence

This action stores existence of the specified object under the given key.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

Key

The variable in which the existence (true/false) of the object is stored.

Yes

 String


Example:
StoreExistence                          "key"

Anchor
_Toc472359928
_Toc472359928
StorePropertyValue

This action stores the property of the specified object under the key name. The stored value can be retrieved using the key name.

Some Android and iOS properties are not accessible.

List of accessible properties for Android: "name","contentDescription","className","resourceId","text","enabled","checkable","checked","clickable","focusable","focused","longClickable","scrollable","selected","displayed"

List of accessible properties for iOS: "name", "value", "type", "visible", "label", "enabled", "accessible", "rect", "frame", "accessibilityContainer", "wdName", "wdValue", "wdType", "wdVisible", "wdLabel", "wdEnabled", "wdAccessible", "wdRect", "wdFrame", "wdAccessibilityContainer"

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

Key

Variable in which the property value will be stored

Yes

 String

Property

Property/attribute name whose value needs to be stored in "Key". This can be any accessible property of Android/iOS native object.

Yes

 String


Example:

StorePropertyValue                            "key"                     "text"

Anchor
_Toc472359929
_Toc472359929
VerifyEnability

This verifies the enability of the specified object. 

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

enability

Value of this parameter can be true or false.
If True – checks if the object is enabled
If False – checks if the object is disabled

No

String


Example:
VerifyEnability                          "TRUE"

Anchor
_Toc472359930
_Toc472359930
VerifyExistence

This verifies the existence of the specified object. 

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

enability

Value of this parameter can be true or false.
If True – checks if the object exists.
If False – checks that the object does not exist.

No

String


Example:
VerifyExistence                          "TRUE"

Anchor
_Toc472359931
_Toc472359931
WaitForObject

This action waits for the object to appear for maximum number of seconds specified. If the object is found or not found before the maximum time specified, the keyword stops waiting.

Input Parameters:

ParameterName

Parameter Description

Mandatory

Data Type

timeOut

The maximum no of seconds to wait to check for the object existence or otherwise. This has to be 0 or a positive integer value.

Yes

String

Existence

String value to specify whether to check for existence or non-existence.
TRUE – check for existence,
FALSE – check for non-existence

Yes

String

Example:

WaitForObject                               "15"                    "TRUE"