TruClient step arguments

This topic lists the step arguments available in TruClient, separated into tables for arguments related to objects (categorized by role), and arguments not related to objects.

Step arguments related to objects

The following table displays the step arguments related to objects and categorized by role. Mandatory arguments are marked with a red star to the left of the argument name in the user interface. All arguments can accept JavaScript code and TruClient functions as values.

Role Action Arguments
element

Mouse Actions: Mouse Down, Mouse Up, Mouse Over*, Click, Double Click

*does not have the X/Y Coordinate arguments

  • Button. The mouse button that is clicked.

  • X Coordinate. The offset location of the action relative to the upper left corner of the object. If not specified, the default is the center of the object.

  • Y Coordinate. The offset location of the action relative to the upper left corner of the object. If not specified, the default is the center of the object.

  • Ctrl Key. Whether or not this key is pressed during the action.

  • Alt Key. Whether or not this key is pressed during the action.

  • Shift Key. Whether or not this key is pressed during the action.

element
Drag
  • Button. The mouse button that is clicked.

  • X Offset. The amount of pixels to drag the object on the x axis. A positive number indicates a drag to the right.

  • Y Offset. The amount of pixels to drag the object on the y axis. A positive number indicates a drag down.

  • Path. List of coordinates representing user drag path. Do not modify this argument.

  • Ctrl Key. Whether or not this key is pressed during the action.

  • Alt Key. Whether or not this key is pressed during the action.

  • Shift Key. Whether or not this key is pressed during the action.

Note: The X Offset, Y Offset, and Path arguments are mutually exclusive.

element
Drag To
  • Target Object. The step object is dragged to this target object.

  • HTML 5. Provides drag and drop support to the browser making it easier to code. When this argument is "true", only the "Target Object" and "HTML5" arguments are visible. When it is "false", the other arguments are also visible.

  • Button. The mouse button that is clicked.

  • X Offset. The offset from the top left of the target object in the x axis. This number must be positive.

  • Y Offset. The offset from the top left of the target object in the y axis. This number must be positive.

  • Ctrl Key. Whether or not this key is pressed during the action.

  • Alt Key. Whether or not this key is pressed during the action.

  • Shift Key. Whether or not this key is pressed during the action.

element
Get Property
  • Property. The property whose value is stored in the specified variable. The list of properties available depends on all the roles of the object.

    The following are the default properties available for all objects:

    • Visible text. The visible text of the item, corresponding to the DOM textContent property.

    • All text. The entire text of the item, corresponding to the DOM textContent property.

    • Inner HTML. The inner html markup of the object, corresponding to the DOM innerHTML property.

  • Variable. The name of the variable in which to store the specified property value.

element Scroll
  • Horizontally. Distance (pixels) to scroll horizontally.

  • Vertically. Distance (pixels) to scroll vertically.

Note: Both arguments must be integers, with minimum and default value of 0. The scrolling is done on the containing document rather than on the element itself.

element Upload
  • Path. The selected path.

element
Verify
  • Value. The string or number to verify.

  • Property. The object property whose value will be verified. The list of properties available to verify depends on all the roles of the object.

    The following are the default properties available for verification on all objects:

    • Visible text. Items that are visible in the application.

    • All text. Items that are in the application but are not necessarily visible. Items in this category are contained in DOM property textContent.

    • Inner HTML. Items contained in the DOM property innerHTML.

  • Condition. The relationship between the value and property arguments.

element
Wait for Property
  • Value. The value of the specified property that the step waits for, before the step passes.

  • Property. The object property whose value the script waits for. The list of properties available for which to wait, depends on all the roles of the object.

    The following are the default properties available for all objects:

    • Visible text. Items that are visible in the application.

    • All text. Items that are in the application but are not necessarily visible. Items in this category are contained in DOM property textContent.

    • Inner HTML. Items contained in the DOM property innerHTML.

  • Condition. The relationship between the value and property arguments.

focusable
Press Key
  • Key name. Enter, Space, Backspace, Tab, Escape, Delete, Up, Down, Left, or Right.

  • Ctrl Key. Whether or not this key is pressed during the action.
  • Alt Key. Whether or not this key is pressed during the action.

  • Shift Key. Whether or not this key is pressed during the action.

textbox
Type
  • Value. What is typed.

  • Clear. Clear the text box before typing. The default is true.

  • Typing Interval. The average time in milliseconds between keystrokes.

checkbox
Set
  • Checked. Set the check box to either checked (true) or unchecked (false).

listbox
Select
  • Text. The selected string or a regular expression. This value is optional.

  • Ordinal. The order of the selected item in the list. If the text argument is also specified, than this argument refers to the instance of the specified text value in the listbox. An ordinal of 0 generates a random value. If both text and ordinal are left empty, then the default ordinal (1) is automatically filled.

  • Inner Object. Allows selecting an option based on TruClient’s object identification mechanism for the option element itself, rather than identifying its container object and specifying an Ordinal.

multi_listbox

Select

  • Text. The selected string or a regular expression.

  • Ordinal. The order of the selected item in the list. If the text argument is also specified, than this argument refers to the instance of the specified text value in the listbox. An ordinal of 0 generates a random value.

multi_listbox

Multi Select

  • Text. The option's text.

  • By Ordinal. Ordinals of the item's Delimiter.

  • Delimiter. The characters used to separate the selected values.

radiogroup
Select
  • Text. The selected string or a use a regular expression.

  • Ordinal. The order of the selected item in the list. If the text argument is also specified, than this argument refers to the instance of the specified text value in the listbox. An ordinal of 0 generates a random value.

filebox
Set
  • Path. The selected path.

slider
Set
  • Value. The value that the slider is set to.

video Seek
  • Time. Sets or returns the current position (in seconds) of the video playback.
audio Seek
  • Time. Sets or returns the current position (in seconds) of the audio playback.
datepicker
Set Day
  • Day. An integer between 1-31 representing the day of the month.

flash object Type
  • Value. What is typed.

browser
Activate
  • Ordinal. Defined as an integer.

  • Title. Defined as a string.

Note: The title is automatically updated during recording and can be set as an alternative step.

browser
Activate Tab
  • Ordinal. Which tab (integer) to activate.

  • Title. Defined as a string.

Note: The title is automatically updated during recording and can be set as an alternative step.

browser
Close Tab
  • Ordinal. Which tab (integer) to close.

  • Title. Defined as a string. Moves the specified browser window to the foreground.

Note: The title is automatically updated during recording and can be set as an alternative step.

browser
Add Tab
  • Location. The URL to navigate to in the newly opened tab. window. Points to the global window object of the application.

browser
Navigate
  • Location. The URL to navigate to.

browser
Go Back
  • Count. The number of pages to go back.

browser
Go Forward
  • Count. The number of pages to go forward.

browser
Resize
  • Width. The new width. Leaving this blank means do not resize the width.

  • Height. The new height. Leaving this blank means do not resize the height.

browser
Scroll
  • X Coordinate. The new x coordinate. Leaving this blank means do not scroll along the x axis.

  • Y Coordinate. The new y coordinate. Leaving this blank means do not scroll along the y axis.

browser
Dialog - Confirm
  • Button. Ok or Cancel.

browser
Dialog Prompt
  • Value. The string to enter.

  • Button. Ok or Cancel.

browser
Dialog - Authenticate
  • Username. The username to enter.

  • Password. The password to enter.

    The password is masked and displayed as dots so that its actual value cannot be seen.

  • Domain. The domain to enter.

  • Button. Ok or Cancel.

Note:

  • If you enter <domain>\<username> in the Username field when using TruClient Browser, the Domain field is left blank and the replay will fail.
    Resolution: Manually add the domain and username arguments separately in the Step Editor.

  • If you want to use dynamic values for the username, password, or domain, we recommend using the Parameter argument type instead of the JavaScript type which fails in most cases.

browser
Dialog - Prompt Password
  • Password. The password to enter.

    The password is masked and displayed as dots so that its actual value cannot be seen.

  • Button. Ok or Cancel.

browser
Verify
  • Value. The value of the property to verify.

  • Property. The property to verify. You can verify the following properties of a browser object:

    • Title. The title of the browser window.

    • Location. The location of the browser window.

  • Condition. The relationship between the value and property arguments.

Back to top

Step arguments not related to objects

The following table displays the step arguments not related to objects. Mandatory arguments are marked with a red star to the left of the argument name in the user interface. All arguments can accept JavaScript code and TruClient functions as values.

Note: The actions in these step arguments do not operate on objects; therefore they do not have a role.

Action Arguments
Evaluate JavaScript

Runs the JavaScript code contained in the step.

  • Code: JavaScript code.

Evaluate C

Receives a C function name and runs it. You can define functions in the C-functions.c file.

  • Function Name. The name of the C function to run.

  • Function Timeout. The amount of time to wait for the function to run (in seconds), before it returns an error.

Call Function Enter values for arguments which are set by the called function (for example, Arg1, Arg2).
Catch Error

Catches an error in the step immediately preceding and runs the contents of the catch error step.

Error Type. Specify the error type you want to catch:

  • Any.

  • Object identification. The object the action is performed on cannot be found.

  • Step arguments. One or more of the arguments to the preceding step is invalid. For example, the data type is wrong.

  • Step Action. The user action failed. For example, a navigation step did not find the page. For an action on a UI element, this error is triggered if the object was found and the action failed anyway.

For Loop

A logical structure that repeats the steps contained in the loop a specified number of times

  • Init. Specify the condition for the initialization operation, which must be met before testing the condition of the first iteration.

  • Condition. Specify the condition for continuing to the next iteration.

    • true. The specified condition is met.
    • false. The specified condition is not met.
    • Regular expression. Define a regular expression as the condition.
  • Increment. Increments a counter in the condition.

Generic API Action

Blank steps that can be inserted and manually configured. The arguments vary according to the API selected. For argument details, see the specific API in the API Help.

  • Variable. The name of the JavaScript variable in which the returned value is stored.

If Block

A logical structure that runs the steps contained in the block if the condition is met.

  • Condition. Specify the condition for continuing to the next iteration.

    • true. The specified condition is met (this is the default setting).
    • false. The specified condition is not met.
    • Regular expression. Define a regular expression as the condition.
Rendezvous

Synchronizes all Vusers in a Controller scenario to run a specified step at the same time.

  • Rendezvous Name. Name for the rendezvous, which is the specific point where Vusers are synchronized in the step.

Verify PDF Content

Verify the content of a PDF document during script execution

  • Path. The file location. The location can be either a local file or a Web page address.
  • Value. The PDF string to verify. The value can be either plain text or JavaScript code.
  • Condition. Specify how to verify the value.

    • Contain. The PDF contains the specified value.
    • Not Contain. The PDF does not contain the specified value.
    • Regular expression. Define a regular expression to search the PDF content.

    Step Limitations

    • You cannot search for content across a page break.
    • You can cannot search for a value that contains both special, such as Chinese or Japanese characters, and alphanumeric characters.
Wait

Wait for a specified number of seconds (or milliseconds), before continuing with the next step.

  • Interval. The time value that the step waits for, before the step passes. The default value is 3.

  • Unit. The interval value. The unit properties available are Seconds (this is the default setting) and Milliseconds.

  • Think Time. Set to true to include the wait time in the think time calculation (this is the default setting).

Wait for File Download

Wait for a file download until it is completed.

  • Timeout: The timeout value (in seconds) for file download. The default value is 180.

  • Variable: The name of the JavaScript variable that stores the properties of the downloaded file, including the full path of the file and the download duration in seconds. You can use this variable directly in other steps to follow, for example, the Verify PDF Content step, or the Evaluate JavaScript step.

Back to top

See also: