Share this page

# Step properties

This topic describes step properties that you can edit in the TruClient 2.0 Step editor.

In this topic:

## About step properties

TruClient records your actions exactly as you performed them. However, when testing you may want the test to run differently than you recorded it. For example, you may want to run some steps only if a condition is true, or to vary the data you enter in the application.

You can edit many of the properties for both recorded steps and manually added steps using the Step editor.

To open the Step editor, expand a step in the Actions view and click More. The properties in the Step editor are divided into three categories:

Category | Description | For details, see:
--- | --- | ---
Step | Properties defining how to run the step, including end event and timeouts. | Step category
Arguments | Properties controlling how an action is carried out. | Arguments category
Object | Properties to identify the test object for the step. | Object category

Note:

- Explanation of the icons and buttons used for the properties are available here: Step options

- The actual categories and category properties for a step vary, depending on the step type and actions.

- For information on properties used by manually-added steps, see Steps box.

## Step category

The following table provides information for some of the Step category properties:

UI Element | Description
--- | ---
Action | The action that defines the step. The list of relevant actions is determined by the object or step type.
Category name | (Supported from version 26.3.) The namespace category containing the predefined methods for the JavaScript API functions. The options include: IO, TC, Utils
End event | The end event occurrence is defined during the first script replay on the browser. You can use the automatically-identified end event, or you can assign a different end event for the step. End event values can be one of the following: Not yet set. The automatic end event has not yet been determined. Action completed. Step ends when its action is completed. An example of an action is a button click. DOM content loaded. Step ends when the page's Document Object Model (DOM) is ready. This means that the API for interacting with the content, style, and structure of a page is ready to receive requests from your application's client side code. Document loaded. Step ends when the process of loading a document is completed. This means that all scripts and style sheets have finished loading and have been executed, and all images have been downloaded and displayed. Step network completed. Step ends when all HTTP requests have completed including requests initiated by XMLHttpRequest. For details on working with end events, see End events.
Method name | (Supported from version 26.3.) The method name defining one of the available API functions within the selected namespace category.
Minimum time | The least time, in seconds, that the execution of the step will take. The value of this field can be either 0 or another manually-set number. If the minimum time is set to 0, the step execution will end immediately after the step's end event. A minimum time value greater than 0 forces TruClient to wait the additional time (if not elapsed already) from the step's end event before moving on to the next step.
Object timeout | If the object does not appear before this time in seconds, the step returns an error. The default value is defined in the runtime settings.
Step timeout | If the End event is not reached by this time in seconds, the step returns an error. The default value is defined in the runtime settings.
Use recorded duration | When set to true, the minimum runtime for the step is the duration it took during recording. When set to false, the recording duration is ignore. The default value is defined in the runtime settings. Note: Once you manually edit the script, the test run may no longer reflect the same duration as during recording.

## Arguments category

The arguments included for a step are determined by the operation defined in the Action or Method name property. Some operations can be performed on the browser window or on an object, but may have different arguments depending on the context, for example, Scroll.

When defining a Generic api action step to create a variable for a JavaScript API function, the arguments are taken from the function arguments. For details, see the Function Reference. (Supported from version 26.3.)

Where applicable, you can use the argument dropdown to choose how the value of the argument is evaluated:

Icon | Step Editor | Description
--- | --- | ---
| Plain text | Plain values. These are primitive types, such as: text, number, Boolean.
| JavaScript | JavaScript expression to be evaluated during replay.
| Parameter name | The key for the parameter. The current value of the parameter is used during replay.

The following table provides information on arguments used by specific actions:

Action | Role/target object | Arguments
--- | --- | ---
Activate tab/Close tab | browser | Ordinal. Which tab (integer) to activate or close. Activating a tab moves the specified tab to the foreground. Title. Defined as a string. Note: The title is automatically updated during recording and can be set as an alternative step.
Add tab | browser | Location. The URL to navigate to in the newly opened tab.
Click/Double click Mouse down/Mouse up | element | Button. The mouse button that is used. This can be the left button (default), middle button, or right button. Use specified coordinates. When set to true, you can manually specify coordinates to use for the object. 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.
Dialog - confirm | browser | Button. The button to press in the dialog, OK or Cancel.
Dialog - prompt | browser | Value. The string to enter in the dialog. Button. The button to press in the dialog, OK or Cancel.
Dialog - prompt password | browser | Password. The password to enter. The password is masked. Button. The button to press in the dialog, OK or Cancel.
Drag | element | 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.
Drag to | element | Button. The mouse button that is used. This can be the left button (default), middle button, or right button. HTML 5. Provides drag and drop support to the browser, making it easier to code. When this argument is false, additional arguments are visible and available for editing. 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.
Enter credentials | browser | Username. The username to use. Password. The password to use. The password is masked. Domain. The domain to use. Note: 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.
Evaluate JavaScript | n/a | Code. The JavaScript code to run for the step.
Get property | element | Property. The object or browser property to identify. Object properties include: Visible text. The visible text of the item, corresponding to the DOM textContent property. All text. The entire text of the item, both visible and not visible. This corresponds to the DOM textContent property. Inner HTML. The inner HTML markup of the object, corresponding to the DOM innerHTML property. Has focus. If the object is focused. Item count. Number of elements under the object. Checked. If the object is checked. Value. Value of the object. Variable. The name of the variable in which to store the specified property value.
Go back/Go forward | browser | Count. The number of pages to go back or forward.
Multi select | multi_listbox | Text. The option's text. By Ordinal. Ordinals of the item's Delimiter. Delimiter. The characters used to separate the selected values.
Navigate | browser | Location. The URL for the application.
Press key | focusable | Key name. The pressed keyboard key that is represented by this action. 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.
Resize | browser | Width. The new width. Leave blank to not change the width. Height. The new height. Leave blank to not change the height.
Type | textbox/flash object | Value. The typed string. For passwords, the value is masked. Clear. Whether or not to clear the text box before typing. Typing interval. The average time in milliseconds between keystrokes.
Scroll (for object) | element | Horizontally. Distance (pixels) to scroll horizontally. Vertically. Distance (pixels) to scroll vertically. Note: Both arguments must be integers, with minimum value of 0. The scrolling is done on the containing document, rather than on the element itself.
Scroll (for browser window) | browser | X coordinate. The new x coordinate. Leave blank to not scroll along the x axis. Y coordinate. The new y coordinate. Leaving blank to not scroll along the y axis.
Seek | audio/video | Time. Sets or returns the current position (in seconds) of the audio or video playback.
Select | listbox/ multi_listbox/ radiogroup | Text. The selected string. 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.
Set day | datepicker | Day. An integer between 1-31 representing the day of the month.
Set value | checkbox/ filebox/ slider | Value. The value to set. For filebox, the value recorded is the file name only. Modify it to the full absolute file path.
Upload | element | Path. The absolute file path of the file to upload. Note: This action is available for non-standard file upload, which cannot be recorded. Select in a Generic object action step.
Verify | element/ browser | Value. The string or number to verify. Property. The property whose value will be verified. The available options depend on whether you are verifying an object, or a browser window. Object properties include: Visible text. The visible text of the item, corresponding to the DOM textContent property. All text. The entire text of the item, both visible and not visible. This corresponds to the DOM textContent property. Inner HTML. The inner HTML markup of the object, corresponding to the DOM innerHTML property. Has focus. If the object is focused. Item count. Number of elements under the object. Checked. If the object is checked. Value. Value of the object. Browser properties include: Title. The title of the browser window. Location. The location of the browser window. Condition. The relationship between the value and property arguments.
Wait for property | element | 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. These include: Visible text. The visible text of the item, corresponding to the DOM textContent property. All text. The entire text of the item, both visible and not visible. This corresponds to the DOM textContent property. Inner HTML. The inner HTML markup of the object, corresponding to the DOM innerHTML property. Has focus. If the object is focused. Item count. Number of elements under the object. Checked. If the object is checked. Value. Value of the object. Condition. The relationship between the value and property arguments.

## Object category

The following table provides information for some of the Object category properties:

Action | How to
--- | ---
Name | The Name box displays a logical name for the object. This does not affect replay and can be modified to enhance readability.
ID method | The ID Method box displays the object identification method used for the object: TruClient identification. Default method. Allows TruClient to use its internal advanced algorithms to identify the object. JavaScript. JavaScript code that returns an object. When you select this option, the JavaScript edit box is displayed, enabling you to write JavaScript to define the object. Cascading style sheets (CSS). Use CSS selectors to identify the object. When you select this option, the Cascading style sheets edit box is displayed, enabling you to use CSS to define the object. XPath. Identifies the object based on the XPath expression that defines the object in the DOM tree. When you select this option, the XPath edit box is displayed, enabling you to select an XPath to define the object. Descriptors. Enables you to identify an object by its properties in an editor. Image. Use visual template matching to locate relevant UI elements. For details on using the ID methods, see Modify the object identification method.
<Selected ID method> | After changing the object identification method in the ID method field to anything other than TruClient identification, a field is added to provide details. Click the Edit button to open the relevant Object identification editor.
Search in all iframes | Select the checkbox if the target object is inside an iframe. This allows the object locator to search through all iframes on the page, not just the main frame.
Parent dynamic ID | Displayed when the ID method is TruClient identification. When the object has a dynamic randomly-generated ID, so that the ID changes every time the page is reloaded, TruClient identification will fail. To resolve this, select the Parent dynamic ID checkbox, and then replace the test object as described in Replace an object.
Target for drag and drop | The target object when the step action is Drag to.

## See also

- Development window
- Steps box
- Work with JavaScript

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: