Java Test Variables

The variables below can be set or retrieved using the Setting.Java method.

Note: If you are using the Oracle Add-in, and you have Java test objects and methods within your Oracle test, you can use these variables in the Java sections of your test.

Variable Name

Description

Possible Values

device_replay
_mode

The operation(s) to use for device-level replay. Device-level replay simulates mouse or key operations exactly as if they occur on the mouse or keyboard drivers. When a mouse action is simulated on device replay, the mouse pointer moves on the screen to the point where the action is to be performed during the test run.

Operations that are not specified for this variable run at the context-sensitive level.

You can specify one or more mask values:

  • 0x0000—NONE

  • 0x0001—CLICK

  • 0x0002—DBLCLICK

  • 0x0004—TYPE

  • 0x0008—DRAG

Note: This setting corresponds to the Perform mouse/keyboard operations at device level for these selected methods option in the Java pane of the Test Settings and Business Component Settings dialog boxes.

disable_hotkey
_recording

Specifies whether hot key presses are recorded.

  • 1—True

  • 0—False

edit_replay
_mode

Controls how actions are performed on edit fields.

One or more values can be specified. Enter multiple values consecutively without a separator. For example: "PTR"

Possible values:

  • P—sends a KeyPressed event to the object for every character from the input string.

    Note: This setting corresponds to the Sending KEY_PRESSED event option in the Java pane of the Test Settings dialog box.

  • T—sends a KEY_TYPED event to the object for every character from the input string. (Selected by default.)

    Note: This setting corresponds to the Sending KEY_TYPED event option in the Java pane of the Test Settings dialog box.

  • R—sends a KEY_RELEASED event to the object for every character from the input string. (Selected by default.)

    Note: This setting corresponds to the Sending KEY_RELEASED event option in the Java pane of the Test Settings dialog box.

  • S—sends the setValue () method to set a value of the edit object.

    Note: This setting corresponds to the Using Java API option in the Java pane of the Test Settings dialog box.

  • I—sends an InputMethod event to the object for every character from the input string. This event is used with Unicode applications (for example, for non-English applications).

    Note: This setting corresponds to the Sending InputMethod event option in the Java pane of the Test Settings dialog box.

  • F—generates a FOCUS_LOST event at the end of method execution.

    Note: This setting corresponds to the Sending FOCUS_LOST event at end option in the Java pane of the Test Settings dialog box.

exclude_control
_chars

The characters that UFT One ignores during a run session.

Note: This setting is relevant only if the Use Java API check box is selected in the Java pane of the Test/Component Settings dialog box, or if the value of the Java.Setting("edit_replay_mode") variable is set to "S".

Any character. List characters consecutively without a separator.

Default = \t\n\r

Note: This setting corresponds to both the Using Java API option in the Java pane of the Test Settings dialog box, and to the to the P value of the Java.Setting("edit_replay_mode") variable.

max_text
_distance

The maximum distance (in pixels) to look for attached text.

Any integer

Default = 100

Note: This setting corresponds to the Search radius for attached text option in the Java pane of the Options dialog box.

record_by_num

Indicates which objects are recorded by index value. Objects not specified are recorded by name.

A string. List values separated by spaces.

Possible values:

  • LIST

  • COMBO

  • TREE

  • TAB

Default = none

Note: This setting corresponds to the Record items mode option in the Java pane of the Options dialog box.

record_win_ops

Specifies whether window operations (move and resize) are recorded.

  • 1—On

  • 0—Off

Default = 0

table_record
_mode

The context-sensitivity level setting for recording.

Specify one of the following modes:

Context Sensitive—Records in Context Sensitive mode.

Analog—Records only low-level (analog) table methods: ClickCell, DoubleClickCell, and Drag.

Default value: Context Sensitive

Note: This setting corresponds to the JavaTable Record mode option in the Advanced Java Options dialog box.

table_internal_
editors_list

The list of controls that you want UFT One to identify as separate test objects. Use this option to access methods that are specific to the object type or to otherwise improve the functionality of steps that UFT One would normally record and run as operations on a JavaTable object.

Note: This option is relevant for JTable Swing toolkit tables.

Editor class names, separated by a space, tab, newline, or return character. Values are case sensitive.

Note: This setting corresponds to the Controls to identify as separate test objects option in the Advanced Java Options dialog box.

table_external_
editors_list

Any single character. If you specify more than one character, for example ";$", then UFT One treats each of the characters as a separator (but not both of them in sequence).

Default = ";"

Note: This setting corresponds to the Tree-view path separator option in the Java pane of the Options dialog box.

Editor class names, separated by a space, tab, newline, or return character. Values are case sensitive.

Note: This setting corresponds to the Controls to treat as part of the JavaTable test object option in the Advanced Java Options dialog box.

treeview_path_
separator

The default separator used to separate entries in a path to a node of a Tree View control.

Any single character. If you specify more than one character, for example ";$", then UFT One treats each of the characters as a separator (but not both of them in sequence).

Default = ";"

Note: This setting corresponds to the Tree-view path separator option in the Java pane of the Options dialog box.

If you are using the Oracle Add-in, and you have Java test objects and methods within your Oracle test, you can use the following variables in the Java sections of your test.

column_number

Specifies the minimum number of columns for a table to be considered a table object. (If the table contains less than this number, the edit boxes are treated as separate objects.)

Any integer

Default = 15

max_column
_gap

Specifies the maximum number of pixels between objects in a table to be considered a column.

Any integer

Default = 12

max_line
_deviation

The maximum number of pixels between objects to be considered to be on a single line.

Any integer

Default = 8

max_list
_columns

The maximum number of columns in an Oracle LOV object to be considered a list. (A larger number constitutes a table.)

Any integer

Default = 99

max_row_gap

The maximum number of pixels between objects to be considered one table row.

Any integer

Default = 12

See also: