TruClient Step Arguments

The following table displays the step arguments 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 Evaluate JavaScript Code: JavaScript code
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 will be 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
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 Verify PDF Content
  • 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.
element
Wait for Property
  • Value. The value of the specified property that the step will wait for, before the step passes.

  • Property. The object property whose value the script will wait 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 or Space.

  • 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 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.

  • 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 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.

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. Note that window.location cannot be used with Internet Explorer. Use document.URL instead.

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.

  • Domain. The domain to enter.

  • Button. Ok or Cancel.

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

  • 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

See also: