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 ActivateItemActivates an item in an SAP column tree or list tree.
Method ActivateNodeActivates a node in an SAP tree.
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.
Common Method GetAllROProperties

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

Method ClickButtonClicks a button item in an SAP column tree or list tree.
Method ClickColumnClicks a column in an SAP column tree or list tree.
Method ClickLinkClicks a link item in an SAP column tree or list tree.
Method CollapseCollapses all the expanded nodes along the specified path.
Method ExpandExpands all the collapsed nodes along the specified path, including the last one.
Method ExtendNodeSelects an additional node in a simple SAP tree.
Common Method GetROPropertyReturns the current value of the description property from the object in the application.
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.
Method OpenContextMenuOpens a tree's default context menu. (Used in conjunction with the SelectMenuItemById method.)
Method OpenHeaderContextMenuOpens a context menu for a header in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)
Method OpenItemContextMenuOpens the context menu for an item in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.)
Method OpenNodeContextMenuOpens the context menu for a node in an SAP simple tree. (Used in conjunction with the SelectMenuItemById method.)
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Method PressEnterPresses the ENTER keyboard key when a tree item or node is in focus.
Common Method RefreshObjectInstructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object.
Method SelectItemSelects an item in an SAP column tree or list tree.
Method SelectMenuItemByIdSelects a menu item from a context menu in a tree based on the specified SAP ID of the menu item.
Method SelectNodeSelects a node in an SAP tree.
Method SetSets the state of a check box item for the specified node in an SAP column tree or list tree.
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.
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

 

ActivateItem Method

Description

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

Syntax

object.ActivateItem (Path, Item)

Arguments

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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 OpenText 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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 OpenText 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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 OpenText 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 OpenText Functional Testing 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

ParameterDescription
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 OpenText Functional Testing 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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 OpenText Functional Testing 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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 OpenText Functional Testing 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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 OpenText Functional Testing 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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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

ParameterDescription
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 SAP Solutions Add-in section of the OpenText Functional Testing Help Center.

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: