JavaTreeTable Object

Description

A JavaFX TreeTable object.

IMPORTANT

The JavaTreeTable test object is supported only on JavaFX.

Operations

The sections below list the built-in methods and properties that you can use as operations for the JavaTreeTable object.

Note: You can also view a list and descriptions of the JavaTreeTable description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Method ActivateActivates a node or row in the tree table.
Method ActivateCellActivates the specified cell in the tree table.
Method ActivateColumnActivates the specified column in the tree table.
Common Method CaptureBitmapSaves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method CheckChecks whether the actual value of an item matches the expected value.
Common Method CheckPropertyChecks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjectsReturns the collection of child objects contained within the object.
Method ClickClicks the specified location with the specified mouse button.
Method ClickCellClicks the specified cell in the tree table.
Method CollapseCollapses a node in an expandable tree table.
Method CreateObjectCreates an instance of any Java object within your application.
Method DblClickDouble-clicks the specified location with the specified mouse button.
Method DeselectClears the selection of a node or row in a tree table.
Method DeselectColumnClears the selection of the specified column in the tree table.
Method DeselectColumnsRangeClears the selection of the specified range of columns in the tree table.
Method DeselectRangeClears the selection of the specified range of nodes in a tree table.
Method DeselectRowsRangeClears the selection of the specified range of rows in the tree table.
Method DoubleClickCellDouble-clicks the specified cell in the tree table.
Method DragPerforms a mouse drag from the specified starting cell to the specified ending cell.
Method ExpandExpands a node in an expandable tree table.
Method ExtendSelectSelects an additional node or row in the tree table.
Method FireEventSimulates an event on a test object using one of several pre-defined event constants.
Method FireEventExSimulates an event on a Java test object, given the ClassName, Event ID, and Event Parameters.
Common Method GetAllROProperties

Returns the collection of properties and current values from the object in the application.

Method GetCellDataReturns the data contained in the specified cell.
Method GetColumnNameReturns the name of the column with the specified index.
Method GetItemReturns the value of the node or row specified by the index.
Common Method GetROPropertyReturns the current value of the description property from the object in the application.
Method GetStaticsReturns the Java object capable of accessing static members (methods and fields) of the specified Java class.
Common Method GetTOPropertiesReturns the collection of properties and values used to identify the object.
Common Method GetTOPropertyReturns the value of the specified description property from the test object description.
Common Method HighlightHighlights the object in the application.
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Method PressKeyPresses the specified key and modifier in the object.
Common Method RefreshObjectInstructs UFT One to re-identify the object in the application the next time a step refers to this object.
Method SelectSelects a node or row in the tree table.
Method SelectCellSelects the specified cell in the tree table.
Method SelectCellsRangeSelects the specified range of cells in the tree table.
Method SelectColumnSelects the specified column in the tree table.
Method SelectColumnsRangeSelects the specified range of columns in the tree table.
Method SelectRangeSelects the specified range of nodes in the tree table.
Method SelectRowsRangeSelects the specified range of rows in the tree table.
Method SetCellDataSets the cell contents with the specified data.
Common Method SetTOPropertySets the value of the specified description property in the test object description.
Common Method ToStringReturns a string that represents the test object.
Method TypeTypes the specified text in the object.
Common Method WaitPropertyWaits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property ExistChecks whether the object currently exists in the open application.
Common Property ObjectAccesses the native methods and properties of the object.

Back to top

 

Activate Method

Description

Activates a node or row in the tree table.

Syntax

object.Activate (Item)

Arguments

ParameterDescription
Item

Required. A Variant.

The path of the node or row to activate (double-click) in the tree table. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box.

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

ActivateCell Method

Description

Activates the specified cell in the tree table.

Syntax

object.ActivateCell (Row, Column)

Arguments

ParameterDescription
Row Required. A Variant.
The row number or row header label of the row containing the cell you want to activate. Row numbers begin with 0.
Column Required. A Variant.
The column number or column header label of the column containing the cell you want to activate. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

ActivateColumn Method

Description

Activates the specified column in the tree table.

Syntax

object.ActivateColumn (Column)

Arguments

ParameterDescription
Column Required. A Variant.
The column number or column header label of the column you want to activate. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

Click Method

Description

Clicks the specified location with the specified mouse button.

Syntax

object.Click (X, Y, [MouseButton])

Arguments

ParameterDescription
X Required. A Variant.
The x-coordinate of the click.
Y Required. A Variant.
The y-coordinate of the click.
MouseButton Optional. A String value.
Indicates whether the click should be performed with the left or right mouse button.
Possible values: 
   "LEFT" (default)
   "RIGHT"


Default value = "LEFT"

Return Type

None.

IMPORTANT

You must enter valid x- and y-coordinates.

Example

Back to top

 

ClickCell Method

Description

Clicks the specified cell in the tree table.

Syntax

object.ClickCell (Row, Col, [MouseButton], [Modifier])

Arguments

ParameterDescription
Row Required. A Variant.
The row number or the row header label. Row numbers begin with 0.
Col Required. A Variant.
The column number or the column header label. Column numbers begin with 0.
MouseButton Optional. A Variant.
Indicates whether the click should be performed with the left or right mouse button.
Possible values:
       "RIGHT"
       "LEFT"

Modifier Optional. A Variant.
The keyboard keys used to perform the operation. 
Use one of the following values:
NONE (default)
SHIFT
CONTROL
CONTROL_SHIFT
LOCK
ALT

Return Type

None.

Example

Back to top

 

Collapse Method

Description

Collapses a node in an expandable tree table.

Syntax

object.Collapse (Item)

Arguments

ParameterDescription
Item

Required. A Variant.
The path of the node to collapse in the tree table. The path is a list of the names (from the first column of the tree table) or index values  separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

CreateObject Method

Description

Creates an instance of any Java object within your application.

Syntax

object.CreateObject (ClassName)

Arguments

ParameterDescription
ClassName Required. A String value.
The Java class name.
Required. None
Any arguments required for the object's constructor. Enter the values in a comma separated list. If no arguments are required for the constructor, you do not need to supply a value for the ConsArgs argument.

Return Type

A Variant.

Returns an object reference. You can use this reference to access the object's methods and properties, without using the Object property.

IMPORTANT

  • The class loader of the Java test object on which the CreateObject method is performed is used to load the class of the newly created Java object.
  • We recommend using the CreateObject method on a test object from the same toolkit as the object you want to create. For example, to create a JavaFX object, use the CreateObject method on an existing JavaFX Java test object.
  • For more information on the CreateObject method, and additional documentation on standard JDK classes, see: http://docs.oracle.com/javase/6/docs/api/index.html

Example

Back to top

 

DblClick Method

Description

Double-clicks the specified location with the specified mouse button.

Syntax

object.DblClick (X, Y, [MouseButton])

Arguments

ParameterDescription
X Required. A Variant.
The x coordinate of the location on the applet to be clicked.
Y Required. A Variant.
The y-coordinate of the location on the applet to be clicked.
MouseButton Optional. A String value.
Indicates whether the double-click should be performed with the left or right mouse button.
Possible values: 
   "LEFT" (default)
   "RIGHT"
Default value = "LEFT"

Return Type

None.

IMPORTANT

You must enter valid x- and y-coordinates.

Example

Back to top

 

Deselect Method

Description

Clears the selection of a node or row in a tree table.

Syntax

object.Deselect (Item)

Arguments

ParameterDescription
Item

Required. A Variant.
The tree table path of the node to deselect. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

DeselectColumn Method

Description

Clears the selection of the specified column in the tree table.

Syntax

object.DeselectColumn (Column)

Arguments

ParameterDescription
Column Required. A Variant.
The column number or the column header label of the column you want to deselect. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

DeselectColumnsRange Method

Description

Clears the selection of the specified range of columns in the tree table.

Syntax

object.DeselectColumnsRange (StartCol, EndCol)

Arguments

ParameterDescription
StartCol Required. A Variant.
The column number or column header label for the first column in the range of columns you want to deselect. Column numbers begin with 0.
EndCol Required. A Variant.
The column number or column header label for the last column in the range of columns you want to deselect. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

DeselectRange Method

Description

Clears the selection of the specified range of nodes in a tree table.

Syntax

object.DeselectRange (Item1, Item2)

Arguments

ParameterDescription
Item1

Required. A Variant.
The tree path of the first node in the range to deselect. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Item2

Required. A Variant.
The tree path of the last node in the range to deselect. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

DeselectRowsRange Method

Description

Clears the selection of the specified range of rows in the tree table.

Syntax

object.DeselectRowsRange (StartRow, EndRow)

Arguments

ParameterDescription
StartRow Required. A Variant.
The row number or row header label of the first row in the range of rows you want to deselect. Row numbers begin with 0.
EndRow Required. A Variant.
The row number or row header label of the last row in the range of rows you want to deselect. Row numbers begin with 0.

Return Type

None.

Example

Back to top

 

DoubleClickCell Method

Description

Double-clicks the specified cell in the tree table.

Syntax

object.DoubleClickCell (Row, Col, [MouseButton], [Modifier])

Arguments

ParameterDescription
Row Required. A Variant.
The row number or the row header label. Row numbers begin with 0.
Col Required. A Variant.
The column number or the column header label. Column numbers begin with 0.
MouseButton Optional. A Variant.
Indicates whether the double-click should be performed with the left or right mouse button.
Possible values:
    "LEFT" (default)       
    "RIGHT"
       
Modifier Optional. A Variant.

The keyboard keys used to perform the operation. 
Use one of the following values:
NONE (default)
SHIFT
CONTROL
CONTROL_SHIFT
LOCK
ALT

Return Type

None.

Example

Back to top

 

Drag Method

Description

Performs a mouse drag from the specified starting cell to the specified ending cell.

Syntax

object.Drag (StartRow, StartCol, EndRow, EndCol, [MouseButton], [Modifier])

Arguments

ParameterDescription
StartRow Required. A Variant.
The row number or row header label of the first row containing the cells you want to drag. Row numbers begin with 0.
StartCol Required. A Variant.
The column number or column header label of the first column containing the cells you want to drag. Column numbers begin with 0.
EndRow Required. A Variant.
The row number or row header label of the last row containing the cells you want to drag. Row numbers begin with 0.
EndCol Required. A Variant.
The column number or column header label of the last column containing the cells you want to drag. Column numbers begin with 0.
MouseButton Optional. A Variant.
Indicates whether the click should be performed with the left or right mouse button. Possible values: 
       "LEFT" (default) 
       "RIGHT"
Modifier Optional. A Variant.

The keyboard keys used to perform the operation. 
Use one of the following values:
NONE (default)
SHIFT
CONTROL
CONTROL_SHIFT
LOCK
ALT

Return Type

None.

Example

Back to top

 

Expand Method

Description

Expands a node in an expandable tree table.

Syntax

object.Expand (Item)

Arguments

ParameterDescription
Item

Required. A Variant.
The path of the node to expand within the tree table. The path is a list of the names (from the first column of the tree table)or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

ExtendSelect Method

Description

Selects an additional node or row in the tree table.

Syntax

object.ExtendSelect (Item)

Arguments

ParameterDescription
Item

Required. A Variant.
The path of the node to add to the selection in the tree table. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box.

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

IMPORTANT

You can use this method, for example, to simulate using the control button to select multiple, non-consecutive nodes in a tree.

Example

Back to top

 

FireEvent Method

Description

Simulates an event on a test object using one of several pre-defined event constants.

Syntax

object.FireEvent (EventType)

Arguments

ParameterDescription
EventType Required. A tagJAVAEVENTTYPE Value.
The name of the pre-defined constant for the event you want to fire.
Required. None

Any parameters of the event's constructor except for the source and EventID. You can pass any Java constant that is used as one of the event’s constructor parameters using its string instead of its value. Enter the values in a comma separated list. If no additional parameters are required, you do not need to supply a value for the EventArguments argument.

Return Type

None.

IMPORTANT

  • If the list of pre-defined constants does not cover the event you want to fire, you can use the FireEventEx method to fire any event that has a constructor.

Example

Back to top

 

FireEventEx Method

Description

Simulates an event on a Java test object, given the ClassName, Event ID, and Event Parameters.

Syntax

object.FireEventEx (ClassName, EventId)

Arguments

ParameterDescription
ClassName Required. A String value.
The name of the Java class representing the event to be activated.
EventId Required. A String value.
The event ID number or the final field string that represents the event ID.
Required. None

Any parameters of the event's constructor except for the source and EventID. You can pass any Java constant that is used as one of the event’s constructor parameters using its string instead of its value. Enter the values in a comma separated list. If no additional parameters are required, you do not need to supply a value for the EventArguments argument.

Return Type

None.

IMPORTANT

  • You can use FireEventEx for any Java event.

Example

Back to top

 

GetCellData Method

Description

Returns the data contained in the specified cell.

Syntax

object.GetCellData (Row, Column)

Arguments

ParameterDescription
Row Required. A Variant.
The row number or row header label of the row containing the cell. Row numbers begin with 0.
Column Required. A Variant.
The column number or column header label of the column containing the cell. Column numbers begin with 0.

Return Type

A Variant.

Example

Back to top

 

GetColumnName Method

Description

Returns the name of the column with the specified index.

Syntax

object.GetColumnName (index)

Arguments

ParameterDescription
index Required. A Variant.
The index of the column whose name you want to return. Index values begin with 0.

Return Type

A Variant.

Example

Back to top

 

GetItem Method

Description

Returns the value of the node or row specified by the index.

Syntax

object.GetItem (index)

Arguments

ParameterDescription
index Required. A Variant.

The numeric index of the node or row you want to retrieve. Index values begin with 0.

Note: To calculate the index, count only the expanded nodes in the tree. Do not count child nodes of a collapsed parent node. The first root node in the tree is numbered 0.

Return Type

A Variant.

Example

Back to top

 

GetStatics Method

Description

Returns the Java object capable of accessing static members (methods and fields) of the specified Java class.

Syntax

object.GetStatics (ClassName)

Arguments

ParameterDescription
ClassName Required. A String value.
The Java class name whose static members you want to access.

Return Type

A Variant.

A reference to a Java object.

IMPORTANT

The class loader of the Java test object on which the GetStatics method is performed is used to load the class specified as a parameter of the GetStatics method.

Example

Back to top

 

PressKey Method

Description

Presses the specified key and modifier in the object.

Syntax

object.PressKey (Key, [Modifier])

Arguments

ParameterDescription
Key

Required. A String value.
The keyboard key(s) to press. If you want to press a function or operation key, use a constant from the following list:

micF1. Presses the F1 key.

micF2. Presses the F2 key.

micF3. Presses the F3 key.

micF4. Presses the F4 key.

micF5. Presses the F5 key.

micF6. Presses the F6 key.

micF7. Presses the F7 key.

micF8. Presses the F8 key.

micF9. Presses the F9 key.

micF10. Presses the F10 key.

micF11. Presses the F11 key.

micF12. Presses the F12 key.

micLeft. Presses the left arrow key.

micRight. Presses the right arrow key.

micDwn. Presses the down arrow key.

micUp. Presses the up arrow key.

micTab. Presses the TAB key.

micReturn. Presses the RETURN or ENTER key.

micBack. Presses the BACK key.

micDel. Presses the DELETE key.

micHome. Presses the HOME key.

micEnd. Presses the END key.

micEsc. Presses the ESC key.

micPause. Presses the PAUSE key.

micPrintScr. Presses the PRINT SCREEN key; supported for JavaFX only.

micIns. Presses the INSERT key.

Modifier Optional. A String value.
The modifier(s) to use.
Supported modifiers:
micCtrl
micAlt
micShift
micCtrlAlt
micCtrlShift
micCtrlShiftAlt
micShiftAlt

Default value = ""

Return Type

None.

IMPORTANT

When typing keys during a recording session, UFT One records the PressKey method when one or more hot keys (such as F-keys, Alt, Ctrl, and so on) are used. 

It also records the PressKey method for any typed key in a Java object that supports text editing, but does not support the Set method.

Example

Back to top

 

Select Method

Description

Selects a node or row in a tree table.

Syntax

object.Select (Item)

Arguments

ParameterDescription
Item

Required. A Variant.
The path of the node to select in the tree table. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

SelectCell Method

Description

Selects the specified cell in the tree table.

Syntax

object.SelectCell (Row, Column)

Arguments

ParameterDescription
Row Required. A Variant.
The row number or row header label of the row containing the cell you want to select. Row numbers begin with 0.
Column Required. A Variant.
The column number or column header label of the column containing the cell you want to select. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

SelectCellsRange Method

Description

Selects the specified range of cells in the tree table.

Syntax

object.SelectCellsRange (StartRow, StartCol, EndRow, EndCol)

Arguments

ParameterDescription
StartRow Required. A Variant.
The row number or row header label of the first row containing the cells you want to select. Row numbers begin with 0.
StartCol Required. A Variant.
The column number or column header label of the first column containing the cells you want to select. Column numbers begin with 0.
EndRow Required. A Variant.
The row number or row header label of the last row containing the cells you want to select. Row numbers begin with 0.
EndCol Required. A Variant.
The column number or column header label of the last column containing the cells you want to select. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

SelectColumn Method

Description

Selects the specified column in the tree table.

Syntax

object.SelectColumn (Column)

Arguments

ParameterDescription
Column Required. A Variant.
The column number or column header label of the column you want to select. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

SelectColumnsRange Method

Description

Selects the specified range of columns in the tree table.

Syntax

object.SelectColumnsRange (StartCol, EndCol)

Arguments

ParameterDescription
StartCol Required. A Variant.
The column number or column header label of the first column in the range of columns you want to select. Column numbers begin with 0.
EndCol Required. A Variant.
The column number or column header label of the last column in the range of columns you want to select. Column numbers begin with 0.

Return Type

None.

Example

Back to top

 

SelectRange Method

Description

Selects the specified range of nodes in a tree table.

Syntax

object.SelectRange (Item1, Item2)

Arguments

ParameterDescription
Item1

Required. A Variant.
The path of the first node in the range to select. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Item2

Required. A Variant.
The path of the last node in the range to select. The path is a list of the names (from the first column of the tree table) or index values separated by the separator character specified in the Tree view path separator option in the Java pane of the Options dialog box. 

Default separator value = semi-colon (;). Specify index values in the format "#N" where N is the numeric value. Index values begin with 0.

Return Type

None.

Example

Back to top

 

SelectRowsRange Method

Description

Selects the specified range of rows in the tree table.

Syntax

object.SelectRowsRange (StartRow, EndRow)

Arguments

ParameterDescription
StartRow Required. A Variant.
The row number or row header label of the first row in the range of rows you want to select. Row numbers begin with 0.
EndRow Required. A Variant.
The row number or row header label of the last row in the range of rows you want to select. Row numbers begin with 0.

Return Type

None.

Example

Back to top

 

SetCellData Method

Description

Sets the cell contents with the specified data.

Syntax

object.SetCellData (Row, Column, data)

Arguments

ParameterDescription
Row Required. A Variant.
The row number or row header label of the row containing the cell in which you want to insert data. Row numbers begin with 0.
Column Required. A Variant.
Indicates the column number or the column header label of the column containing the cell in which you want to insert data. Column numbers begin with 0.
data Required. A String value.
The data to be inserted in the specified cell.

Return Type

None.

Example

Back to top

 

Type Method

Description

Types the specified text in the object.

Syntax

object.Type (Text)

Arguments

ParameterDescription
Text

Required. A String value.
The text to type and/or the modifier(s) to press.
Supported modifiers:
micAlt
micShift
micCtrlAlt
micCtrlShift
micCtrlShiftAlt
micShiftAlt

For additional supported keyboard presses, see PressKey method.

Return Type

None.

IMPORTANT

This method is not recorded. (Keyboard operations are recorded using the Set or PressKey methods.) The Type method is useful for entering a combination of text and keyboard modifiers. You concatenate text strings and keyboard modifiers using the ampersand (&) symbol. For example, you can enter: Type "Hello World" & micCtrl & "S"

To add this method to your test, use the Step Generator or enter it manually in the Keyword View or Editor. For more information, see the UFT One User Guide.

Note: Although the Type method is supported for most objects, if you enter a Type statement for an object in which a user cannot enter text, the method has no visual effect.

Example

Back to top

See also: