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
ActivateItem | Activates an item in an SAP column tree or list tree. |
ActivateNode | Activates a node in an SAP tree. |
CaptureBitmap | Saves a screen capture of the object as a .png or .bmp image using the specified file name. |
Check | Checks whether the actual value of an item matches the expected value. |
CheckProperty | Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout. |
ChildObjects | Returns the collection of child objects contained within the object. |
GetAllROProperties | Returns the collection of properties and current values from the object in the application. |
ClickButton | Clicks a button item in an SAP column tree or list tree. |
ClickColumn | Clicks a column in an SAP column tree or list tree. |
ClickLink | Clicks a link item in an SAP column tree or list tree. |
Collapse | Collapses all the expanded nodes along the specified path. |
Expand | Expands all the collapsed nodes along the specified path, including the last one. |
ExtendNode | Selects an additional node in a simple SAP tree. |
GetROProperty | Returns the current value of the description property from the object in the application. |
GetTOProperties | Returns the collection of properties and values used to identify the object. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
Highlight | Highlights the object in the application. |
OpenContextMenu | Opens a tree's default context menu. (Used in conjunction with the SelectMenuItemById method.) |
OpenHeaderContextMenu | Opens a context menu for a header in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.) |
OpenItemContextMenu | Opens the context menu for an item in an SAP column tree or list tree. (Used in conjunction with the SelectMenuItemById method.) |
OpenNodeContextMenu | Opens the context menu for a node in an SAP simple tree. (Used in conjunction with the SelectMenuItemById method.) |
Output | Retrieves the current value of an item and stores it in a specified location. |
PressEnter | Presses the ENTER keyboard key when a tree item or node is in focus. |
RefreshObject | Instructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object. |
SelectItem | Selects an item in an SAP column tree or list tree. |
SelectMenuItemById | Selects a menu item from a context menu in a tree based on the specified SAP ID of the menu item. |
SelectNode | Selects a node in an SAP tree. |
Set | Sets the state of a check box item for the specified node in an SAP column tree or list tree. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
ToString | Returns a string that represents the test object. |
WaitProperty | Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step. |
Properties
Exist | Checks whether the object currently exists in the open application. |
Object | Accesses the native methods and properties of the object. |
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 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
'The following example uses the ActivateItem method to activate the "ORG_STEXT" item in the "Vice President of HR & Finance (D)" sub-node of the tree. SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTabStrip("STRIP_OMDETAIL").Select " Account assignment" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").ActivateItem "Exec.director - Germany;Vice President of HR & Finance (D);ORG_STEXT", "ORG_STEXT"
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. 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
'The following example uses the ActivateNode method to activate the "SBWP - Workplace" inner node after expanding the parent nodes in the tree. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Expand "SAP menu;Office" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Expand "SAP menu;Office;Telephone Integration" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").ActivateNode "SAP menu;Office;Telephone Integration;SPHD - Own Telephone Number"
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 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
'The following example uses the ClickButton method to invoke the "Restrict Value" window by clicking the '"Column2" button in the "Sales activities" tree node. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").ActivateNode "SAP menu;Logistics;Sales and Distribution;Sales Support;Sales activities" SAPGuiSession("Session").SAPGuiWindow("Create Sales").SAPGuiTree("TableTreeControl").ClickButton "Root Col. 1;Child1 Col. 1", "Column2" SAPGuiSession("Session").SAPGuiWindow("Restrict Value").SAPGuiEdit("G_SELFLD_TAB-LOW").Set "Eduards" SAPGuiSession("Session").SAPGuiWindow("Restrict Value").SAPGuiButton("Continue (Enter)").Click
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
'The following example uses the ClickColumn method to click the "HierarchyHeader" column in the "TableTreeControl" tree. SAPGuiSession("Session").SAPGuiWindow("Create Purchase").SAPGuiTree("TableTreeControl").ClickColumn "HierarchyHeader"
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 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
'The following example uses the ClickLink method to click link "C3" in the "TableTreeControl" tree. SAPGuiSession("Session").SAPGuiWindow("Change: Project").SAPGuiTree("TableTreeControl").ClickLink "#1", "C3"
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 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
'The following example uses the Collapse method to collapse each child node of the "SAP menu" node individually '(it first collapses the lowest sub-node under the root level, and then the one above it, and so forth) 'after selecting the ME21N - "Vendor/Supplying Plant Known" node in the "TableTreeControl" tree. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectNode "SAP menu;Logistics;Materials Management;Purchasing;Purchase Order;Create;ME21N - Vendor/Supplying Plant Known" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu;Logistics;Materials Management;Purchasing;Purchase Order;Create" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu;Logistics;Materials Management;Purchasing;Purchase Order" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu;Logistics;Materials Management;Purchasing" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu;Logistics;Materials Management """ SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu;Logistics" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Collapse "SAP menu"
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 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
'The following example uses the Expand method to expand "SAP menu > Office > Appointment Calendar" and then 'activate the "SSC1 - Own" node under the "Appointment Calendar" node. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").Expand "SAP menu;Office;Appointment Calendar " SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").ActivateNode "SAP menu; Office;Appointment Calendar;SSC1 - Own"
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 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
'The following example uses the ExtendNode method to select multiple nodes in the "Actions" tree. SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").Expand "Actions" SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").SelectItem "Actions;Date of last change", "&Hierarchy" SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").ExtendNode "Actions;Valid from date" SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").ExtendNode "Actions;Reason for action"
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
'The following example uses the OpenContextMenu method to right-click and open the context menu of the main SAP tree and 'select the menu item with SAP ID "XXSAPM". SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").OpenContextMenu SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectMenuItemById "XXSAPM"
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 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
'The following example uses the OpenHeaderContextMenu method to open the context menu for the "HierarchyHeader" 'column and then selects the "CONFIGURE_COLUMNS" menu item to open the "Column Configuration" dialog box and clear 'one of the check boxes. SAPGuiSession("Session").SAPGuiWindow("Choose Resource").SAPGuiTree("TableTreeControl").OpenHeaderContextMenu "HierarchyHeader" SAPGuiSession("Session").SAPGuiWindow("Choose Resource").SAPGuiTree("TableTreeControl").SelectMenuItemById "CONFIGURE_COLUMNS" SAPGuiSession("Session").SAPGuiWindow("Column Configuration").SAPGuiTree("TableTreeControl").Set "#3", "Text", "OFF" SAPGuiSession("Session").SAPGuiWindow("Column Configuration").SAPGuiButton("Continue (Enter)").Click
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 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
'The following example uses the OpenItemContextMenu method to select the "Collapse" menu item from the Hierarchy 'Item's context menu and then selects the "Expand" menu item from the same context menu to re-expand the tree. SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").OpenItemContextMenu "#1", "&Hierarchy" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").SelectMenuItemById "&COLLAPSE" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").OpenItemContextMenu "#1", "&Hierarchy" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").SelectMenuItemById "&EXPAND"
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 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
'The following example uses the OpenNodeContextMenu method to select the "Collapse" menu item from the first 'node in the tree, and then selects the "Expand" menu item from the same context menu to re-expand the tree. SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").OpenNodeContextMenu "#1" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").SelectMenuItemById "&COLLAPSE" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").OpenNodeContextMenu "#1" SAPGuiSession("Session").SAPGuiWindow("Personalstammdaten").SAPGuiTree("TableTreeControl").SelectMenuItemById "&EXPAND"
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
'The following example uses the PressEnter method. It uses the SelectNode and PressEnter statements to expand 'the tree and activate the SBWP-Workplace node. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectNode "SAP menu;Office" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").PressEnter SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectNode "SAP menu;Office; SBWP - Workplace" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").PressEnter
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 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
'The following example uses the SelectItem method to select the "ORG_STEXT" item in the '"Exec.director - Germany;Vice President of HR & Finance (D)" node of the tree. SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").SelectItem "Exec.director - Germany;Chief Executive Officer (D)", "ORG_STEXT" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").PressEnter
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 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
'The following example uses the SelectMenuItemById method. It opens the context menu for the Manager Sales Unit 'Stutgart tree item and selects the Move up in rank menu item. Then it opens the same context menu again to select the Collapse Node option. Note that although you do not see the opening and selection of items in the context menu, you can see the results of the operation in the Active Screen and during the test run. For example, in the test below, you would see the collapsed tree in the Active Screen of the step after the Collapse Node step. SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").OpenItemContextMenu "Manager Sales Unit Stuttgart", "ORG_STEXT" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").SelectMenuItemById "MOVE_UP" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").OpenItemContextMenu "Manager Sales Unit Stuttgart", "ORG_STEXT" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").SelectMenuItemById "COLLAPSE_NODE" SAPGuiSession("Session").SAPGuiWindow("Organization").SAPGuiTree("TableTreeControl").ActivateItem "Manager Sales Unit Stuttgart", "ORG_STEXT"
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". 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
'The following example uses the SelectNode method and the PressEnter method to expand the tree and activate the 'SBWP-Workplace inner node. SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectNode "SAP menu;Office" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").PressEnter SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").SelectNode "SAP menu;Office; SBWP - Workplace" SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access").SAPGuiTree("TableTreeControl").PressEnter
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 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
'The following example uses the Set method to select the C5 and C7 check 'boxes (after expanding the "Key fields" node). SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").Expand "Key fields" SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").Set "Key fields;Object ID", "C 5", "ON" SAPGuiSession("Session").SAPGuiWindow("HR Object Selection").SAPGuiTree("TableTreeControl").Set "Key fields;Object ID", "C 7", "ON"
See also: