Native step argument reference
This section lists the actions and roles of the TruClient native objects that are specific to the OpenText Functional Testing Lab integration.
Mandatory argument values are indicated by an asterisk in the Step editor. Data types are shown in italics in the tables below.
To learn more about the step arguments, view their tooltips in the Step editor.
Device actions
Action | OS |
Description |
---|---|---|
Set Orientation | Android, iOS |
Sets the device orientation. Arguments:
|
SMS Received | Android, iOS |
Sends the AUT to the background when an SMS is received. Arguments:
|
Call Received | Android, iOS |
Sends the AUT to the background when a call is received. Arguments:
|
Press Key | Android, iOS |
Presses a key on a keyboard including non-alphanumerical values, such as Space, Delete, and the expansion of the keyboard to show more numbers or characters. Arguments:
|
Location Changed | Android, iOS |
Sets the device location to a new physical location. Arguments:
|
To Background | Android, iOS |
Sends the AUT to the background. Argument:
|
Type | Android, iOS |
Types in text. Argument:
|
Swipe | Android, iOS |
Performs a swipe in the specified direction. Arguments:
|
Switch Keyboard Layout | iOS |
Switches the keyboard layout from letter to numbers and back. Arguments:
|
Press Home | Android |
Presses the device's Home button. |
Press Back | Android |
Presses the device's Back button. |
Press Menu |
Android |
Presses the device's Menu button. |
Press Recent Apps | Android |
Opens the list of recent apps. |
Press Enter | Android |
Presses the device's keypad enter button. (Relevant only in apps that support it.) |
Press Search | Android |
Presses the device's keypad search button (Relevant only in apps that support it.) |
Press Delete | Android |
Presses the device's delete button, if it exists. |
Touch | Android, iOS |
Simulates a Touch action on the device. Arguments:
Note: The touch operation is recorded in Analog mode. This is used as a workaround for objects that are not supported by OpenText Functional Testing Lab. |
Scroll |
Android |
Scrolls an object into view. Arguments:
|
WebView actions
NativeWebView role actions
Action | OS |
Description |
---|---|---|
Activate WebView | Android, iOS |
Makes the current WebView active. |
WebView actions for older versions
This following actions only apply to scripts created with TruClient versions 12.53 and earlier, providing backwards compatibility.
Action |
OS |
Description |
---|---|---|
SetFocus
|
Android, iOS |
Sets the focus to the browser. |
SetText
|
Android, iOS |
Sends text to the browser. Arguments:
|
Tap |
Android, iOS |
Taps in the browser. |
ScrollOnePage |
Android, iOS |
Scrolls a single page in the browser. Arguments:
|
Browser role actions
Action |
OS |
Description |
---|---|---|
Navigate
|
Android, iOS |
Navigates to the specified URL. Arguments:
|
Refresh
|
Android, iOS |
Refreshes the browser window. |
Back |
Android, iOS |
Navigates back to the previously viewed page. |
Forward |
Android, iOS |
Navigates forward to the previously viewed page. |
Input role actions
Action | OS |
Description |
---|---|---|
Set Text | Android, iOS |
Inputs the specified text. Arguments:
If the recorded SetText action is for a password field, we strongly recommend to store the encrypted password and use the TC.unmask function to retrieve the argument. |
Set Focus | Android, iOS |
Sets the focus on the input object. |
Unfocus | iOS |
Removes the focus from the input object. |
ItemSelector role actions
Action | OS |
Description |
---|---|---|
Pick | Android, iOS |
Picks an item in the view. Arguments:
|
Miscellaneous actions
Role > Action | OS |
Description |
---|---|---|
Button | Android, iOS | Inherits all View actions. |
Checkbox > Set | Android |
Selects a check box. Arguments:
|
Checked Label > Set | Android |
Selects a label. Arguments:
|
Date Selector > Pick | Android, iOS |
Sets the selected date, using the specified format. Arguments:
Note: When recording a step with this method, TruClient uses one of the formats, depending on the date selector object used on the device. When editing a step with this method, you can also use other similar formats. The format you specify in the DateFormat parameter must match the format of the string you provide in the SelectedDate argument. |
Label | Android, iOS |
Inherits all View actions. |
PageControl > Set | iOS |
Selects the indexed page. Arguments:
|
RadioGroup > Select | Android, iOS |
Selects the button in the radio group, by index or text. Arguments: One of these arguments must be specified:
|
RatingBar > Select | Android |
Selects the rating value. Arguments:
|
Slider > Slide | Android, iOS |
Moves the slider to the specified position. Arguments:
Possible values for position are determined by the range of the slider. |
Stepper > Tap | iOS |
Increments or decrements the stepper. Arguments:
|
Switch > Set | Android, iOS | Turns the switch on or off. Arguments:
|
TabBar > Select | Android, iOS |
Selects a tab. Arguments: One of the following must be specified:
|
Toggle Button > Set | Android |
Turns a button on or off. Arguments:
|
CollectionView role actions
Action | OS |
Description |
---|---|---|
Scroll | iOS |
Scrolls to an item and section in the collection view. Arguments: Specify either the Item and Section parameters or the x/y offset parameters.
|
Select | iOS |
Selects an item and section in the collection view. Arguments:
|
Unselect | iOS |
Deselects an item and section in the collection view. Arguments:
|
ScrollOnePage | iOS |
Scrolls the collection view one page over in the selected direction. Arguments:
|
ScrollToTop | iOS |
Scrolls to the top of the collection view. |
Scroller role actions
Action | OS |
Description |
---|---|---|
Scroll | Android, iOS |
iOS only: Scrolls the element the specified number of pixels. Arguments:
Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. Android: No arguments. The scroll location is decided according to the internal object representation. |
Zoom | iOS |
Enlarges or decreases the object view according to the specified scale. Arguments:
|
ScrollOnePage | Android, iOS |
Scrolls the page up or down in the selected direction. Arguments:
|
Table role actions
Action | OS |
Description |
---|---|---|
Tap | iOS |
Taps the table where specified. Arguments:
|
RemoveTableRow | iOS |
Deletes a row from the table. Arguments:
|
Select | Android, iOS |
Selects a row in a section in the table. Arguments:
|
SelectByLabel | iOS |
Selects a row in a section in the table. Arguments:
|
Scroll | Android, iOS |
Scrolls up or down. Arguments: Tip: Optional. For iOS, specify either the Row and Section parameters or the x/y-offset parameters.
|
ScrollByLabel | Android, iOS |
Scrolls to a specific label. Arguments:
|
ScrollOnePage | Android, iOS |
Scrolls forward, backward, left, or right. Arguments:
|
ScrollToTop | iOS |
Scrolls to the top of the table. |
Insert | iOS |
Inserts a row in the table. Arguments:
|
Delete | iOS |
Deletes a row from the table. Arguments:
|
Move | iOS |
Moves a row to a new location in the table. Arguments:
|
View role actions
Action | OS |
Description |
---|---|---|
Tap | Android, iOS |
Simulates tapping on the device's screen. Arguments:
|
Long Press | Android, iOS |
Simulates a long press of the user. Arguments:
|
Get Property | Android, iOS |
Retrieves the specified property. Arguments:
|
Swipe | Android, iOS |
Swipes the view in the specified direction. Arguments:
|
Pan | Android, iOS |
Performs a Pan gesture on the object. Arguments:
|
Pinch | Android, iOS |
Performs a Pinch gesture. Arguments:
|
Rotation | iOS |
Rotates the view. Arguments:
|
Verify | Android, iOS |
Verifies the view. Arguments:
|
See also: