SAPGuiTree Object

Description

A column tree, list tree, or simple tree control in an SAP GUI for Windows application.

Operations

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

Note: You can also view a list and descriptions of the SAPGuiTree 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 ActivateItem Activates an item in an SAP column tree or list tree.
Method ActivateNode Activates a node in an SAP tree.
Common Method CaptureBitmap Saves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method Check Checks whether the actual value of an item matches the expected value.
Common Method CheckProperty Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjects Returns the collection of child objects contained within the object.
Method ClickButton Clicks a button item in an SAP column tree or list tree.
Method ClickColumn Clicks a column in an SAP column tree or list tree.
Method ClickLink Clicks a link item in an SAP column tree or list tree.
Method Collapse Collapses all the expanded nodes along the specified path.
Method Expand Expands all the collapsed nodes along the specified path, including the last one.
Method ExtendNode Selects an additional node in a simple SAP tree.
Common Method GetROProperty Returns the current value of the description properties from the object in the application.
Common Method GetTOProperties Returns the collection of properties and values used to identify the object.
Common Method GetTOProperty Returns the value of the specified description properties from the test object description.
Method OpenContextMenu Opens a tree�s default context menu. (Used in conjunction with the SelectMenuItemById method.)
Method OpenHeaderContextMenu Opens a context menu for a header in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)
Method OpenItemContextMenu Opens the context menu for an item in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)
Method OpenNodeContextMenu Opens the context menu for a node in an SAP simple tree. (Used in conjunction with the SelectMenuItemById method.)
Common Method Output Retrieves the current value of an item and stores it in a specified location.
Method PressEnter Presses the ENTER keyboard key when a tree item or node is in focus.
Common Method RefreshObject Instructs UFT to re-identify the object in the application the next time a step refers to this object.
Method SelectItem Selects an item in an SAP column tree or list tree.
Method SelectMenuItemById Selects a menu item from a context menu in a tree based on the specified SAP ID of the menu item.
Method SelectNode Selects a node in an SAP tree.
Method Set Sets the state of a check box item for the specified node in an SAP column tree or list tree.
Common Method SetTOProperty Sets the value of the specified description properties in the test object description.
Common Method ToString Returns a string that represents the test object.
Common Method WaitProperty Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property Exist Checks whether the object currently exists in the open application.
Common Property Object Accesses the native methods and properties of the object.

Back to top

 

ActivateItem Method

Description

Activates an item in an SAP column tree or list tree.

Syntax

object.ActivateItem (Path, Item)

Arguments

Parameter Description
Path Required. A String value.

The path to the item you want to activate. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin with 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the UFT SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the SAP item you want to activate. The item can be specified by the name or index number in the format " #index". Index values begin with 1.

Return Type

None.

IMPORTANT

The ActivateItem method is recorded for multi-column or list trees. The ActivateNode method is recorded for simple tree types or some column/list trees with only one column.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

Example

Back to top

 

ActivateNode Method

Description

Activates a node in an SAP tree.

Syntax

object.ActivateNode (Path)

Arguments

Parameter Description
Path Required. A String value.

The path to the node you want to activate. Separate nodes in the path can be specified by the name or index number (in the format "#index") . Index values begin with 1.
For a full path, separate items with semicolons (;).

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the UFT SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

The ActivateNode method is recorded for simple tree types or for some column and list trees with only one column. The ActivateItem method is recorded for multi-column or list trees.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

Example

Back to top

 

ClickButton Method

Description

Clicks a button item in an SAP column tree or list tree.

Syntax

object.ClickButton (Path, Item)

Arguments

Parameter Description
Path Required. A String value.

The path to the button you want to click. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin with 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the UFT SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the SAP button item you want to click. The item can be specified by the name or index number in the format " #index". Index values begin with 1.

Return Type

None.

Example

Back to top

 

ClickColumn Method

Description

Clicks a column in an SAP column tree or list tree.

Syntax

object.ClickColumn (Column)

Arguments

Parameter Description
Column Required. A String value.
The name or numeric index (in the format "#index") of the column to click. Index values begin with 1.

Return Type

None.

Example

Back to top

 

ClickLink Method

Description

Clicks a link item in an SAP column tree or list tree.

Syntax

object.ClickLink (Path, Item)

Arguments

Parameter Description
Path Required. A String value.

The path to the link item you want to click. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin with 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the UFT SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the SAP link item you want to click. The item can be specified by the name or index number in the format " #index". Index values begin with 1.

Return Type

None.

Example

Back to top

 

Collapse Method

Description

Collapses all the expanded nodes along the specified path.

Syntax

object.Collapse (Path)

Arguments

Parameter Description
Path Required. A String value.

The path of the node to collapse. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin with 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

This method is not recorded. 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 Unified Functional Testing User Guide.

Example

Back to top

 

Expand Method

Description

Expands all the collapsed nodes along the specified path, including the last one.

Syntax

object.Expand (Path)

Arguments

Parameter Description
Path Required. A String value.

The path of the node to expand. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin from 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

This method is not recorded. 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 Unified Functional Testing User Guide.

Example

Back to top

 

ExtendNode Method

Description

Selects an additional node in a simple SAP tree.

Syntax

object.ExtendNode (Path)

Arguments

Parameter Description
Path Required. A String value.

The path of the node to add to the selection. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin from 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

This method is valid only for trees that support multiple node selection.

This method is not recorded. 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 Unified Functional Testing User Guide.

Example

Back to top

 

OpenContextMenu Method

Description

Opens a tree�s default context menu. (Used in conjunction with the SelectMenuItemById method.)

Syntax

object.OpenContextMenu

Return Type

None.

IMPORTANT

After opening a context menu, you use the SelectMenuItemById method to select the menu item.

Although UFT successfully records and runs steps performed on context menus, the context menu is not displayed in the Active Screen or in your application during the test run.

Example

Back to top

 

OpenHeaderContextMenu Method

Description

Opens a context menu for a header in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)

Syntax

object.OpenHeaderContextMenu (Column)

Arguments

Parameter Description
Column Required. A String value.
The column whose context menu you want to open. The column can be specified by the column's label or column number in the format "#index". Column numbers begin with 1.

Return Type

None.

IMPORTANT

After opening a context menu, you use the SelectMenuItemById method to select the menu item.

Although UFT successfully records and runs steps performed on context menus, the context menu is not displayed in the Active Screen or in your application during the test run.

Example

Back to top

 

OpenItemContextMenu Method

Description

Opens the context menu for an item in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)

Syntax

object.OpenItemContextMenu (Path, Item)

Arguments

Parameter Description
Path Required. A String value.

The path to the item whose context menu you want to open. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin from 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the item whose context menu you want to open.

Return Type

None.

IMPORTANT

The OpenItemContextMenu method is recorded for multi-column or list trees. The OpenNodeContextMenu method is recorded for simple tree types and some column or list trees with only one column.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

After opening a context menu, you use the SelectMenuItemById method to select the menu item.

Although UFT successfully records and runs steps performed on context menus, the context menu is not displayed in the Active Screen or in your application during the test run.

Example

Back to top

 

OpenNodeContextMenu Method

Description

Opens the context menu for a node in an SAP simple tree. (Used in conjunction with the SelectMenuItemById method.)

Syntax

object.OpenNodeContextMenu (Path)

Arguments

Parameter Description
Path Required. A String value.

The path to the node whose context menu you want to open. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin from 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

The OpenNodeContextMenu method is recorded for simple tree types and some column or list trees with only one column. The OpenItemContextMenu method is recorded for multi-column or list trees.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

After opening a context menu, you use the SelectMenuItemById method to select the menu item.

Although UFT successfully records and runs steps performed on context menus, the context menu is not displayed in the Active Screen or in your application during the test run.

Example

Back to top

 

PressEnter Method

Description

Presses the ENTER keyboard key when a tree item or node is in focus.

Syntax

object.PressEnter

Return Type

None.

IMPORTANT

A SelectNode or SelectItem statement followed by a PressEnter method is equivalent to an ActivateNode or ActivateItem statement.

Example

Back to top

 

SelectItem Method

Description

Selects an item in an SAP column tree or list tree.

Syntax

object.SelectItem (Path, Item)

Arguments

Parameter Description
Path Required. A String value.

The path to the item you want to select. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin with 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the SAP item you want to select. The item can be specified by the name or index number in the format " #index". Index values begin with 1.

Return Type

None.

IMPORTANT

The SelectItem method is used for multi-column or list trees. The SelectNode method is used for simple tree types and some column or list trees with only one column.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

Example

Back to top

 

SelectMenuItemById Method

Description

Selects a menu item from a context menu in a tree based on the specified SAP ID of the menu item.

Syntax

object.SelectMenuItemById (MenuItemId)

Arguments

Parameter Description
MenuItemId Required. A String value.
The ID for the menu item.

Return Type

None.

IMPORTANT

The SelectMenuItemById method is always preceded by an open context menu step (OpenContextMenu, OpenHeaderContextMenu, OpenItemContextMenu, or OpenNodeContextMenu methods).

Although UFT successfully records and runs steps performed on context menus, the context menu is not displayed in the Active Screen or in your application during the test run.

Example

Back to top

 

SelectNode Method

Description

Selects a node in an SAP tree.

Syntax

object.SelectNode (Path)

Arguments

Parameter Description
Path Required. A String value.

The tree node to select. The name, full path, or numeric index can denote the node. Index values begin with 1. The path items can be specified by the name or index number in the format " #index".
For a full path, separate items with semicolons (;).

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Return Type

None.

IMPORTANT

The SelectNode method is used for simple tree types and some column or list trees with only one column. The SelectItem Method is used for multi-column or list trees.

If you are not sure which type of tree object you are working with in your application, you can use the Properties tab of the Object Spy to view the treetype description properties. All tree objects have one of the following treetype property values: SapListTree, SapColumnTree, or SapSimpleTree.

Example

Back to top

 

Set Method

Description

Sets the state of a check box item for the specified node in an SAP column tree or list tree.

Syntax

object.Set (Path, Item, Status)

Arguments

Parameter Description
Path Required. A String value.

The path to the check box tree item you want to set. Separate items in the path with semicolons (;). The path items can be specified by the name or index number in the format " #index". Index values begin from 1.

You can also use regular expressions in the path name, using the format: RegExp:=<regular expression>.

For example: RegExp:=Workplace:.*;Inbox;RegExp:=Unread Documents.*

For more information, see the Unified Functional Testing SAP Solutions Add-in Guide.

Item Required. A String value.
The text of the check box tree item you want to set. The item can be specified by the name or index number in the format " #index". Index values begin with 1.
Status Required. A String value.
The state of the check box.
Possible values:
       "ON"
       "OFF"

Return Type

None.

Example

Back to top

See also: