SapTree Class

Description

SapTree class is the class for all SAP trees. Some of the methods that have Get as a prefix require the nodeKey and the ItemName as iput parameters of type string. These parameters are different for each individual SapTree element. To obtain the value of these parameters, record an action on the desired item and use the parameters that you have recorded.

Inheritance Hierarchy

Syntax

'Declaration
Public Class SapTree _
Inherits SapShell _
Implements ISapContextMenuable

Properties

Name Description
AccessibilityDescription the accessibility description of the shell.
AccessibilityText an additional text for accessibility support. (Inherited from SapComponent)
AccessibilityTextOnRequest an additional text for accessibility support. (Inherited from SapComponent)
AccessibilityTooltip an additional tooltip text for accessibility support. (Inherited from SapComponent)
Changeable whether an object is changeable. (Inherited from SapComponent)
ColumnHeaders a collection of the titles of the columns.
ColumnNames a collection of the column names.
ColumnOrder the column order.
ColumnTitles a collection of the titles of the columns.
CurrentContextMenu The current context menu. This is only set when a context menu is available at the shell object.
DefaultTooltip the tooltip text which is generated from the short text defined in the data dictionary for the given screen element type. (Inherited from SapComponent)
DragDropSupported whether the shell allows drag and drop operations. (Inherited from SapShell)
FocusedNodeKey the key of the focused node.
Height the current height of the component. (Inherited from SapComponent)
HierarchyHeaderWidth the width of the hierarchy header in pixels.
HierarchyTitle the hierarchy title.
IconName whether the object has been assigned an icon, then this property is the name of the icon, otherwise it is an empty string. (Inherited from SapComponent)
IsSymbolFont whether the component's text is visualized in the SAP symbol font. (Inherited from SapComponent)
Left the left position of the element in screen coordinates. (Inherited from SapComponent)
Modified whether the state has been changed by the user and this change has not yet been sent to the SAP system. (Inherited from SapComponent)
Name the name of the component. (Inherited from SapComponent)
NodeKeys a collection containing either the node key of the root node, or the node keys of all nodes in the tree, depending on the application.
ScreenLeft the left position of the component in screen coordinates. (Inherited from SapComponent)
ScreenTop the top position of the component in screen coordinates. (Inherited from SapComponent)
SelectedItemColumn the key of the currently selected item column.
SelectedItemNode the key of the currently selected item node.
SelectedNode the key of the currently selected node.
SelectedNodes a collection containing the node keys of all the selected nodes in the tree.
SelectionMode the selection mode.
Text The text of the control. (Inherited from TestObject)
Tooltip the tooltip text. (Inherited from SapComponent)
Top the top coordinate of the element in screen coordinates. (Inherited from SapComponent)
TopNode the key of the top node.
TreeType the tree type. (simple tree, list tree or column tree)
Value The value of the control, e.g.: text in a text control. (Inherited from TestObject)
Width the current width of the component. (Inherited from SapComponent)

Methods

Name Description
CaptureBitmap Saves a bitmap image of this object to a file. If you do not specify an absolute file name, the bitmap is saved to the default bitmap location on the machine that runs the Agent, which is %LOCALAPPDATA%/Silk/SilkTest/capturedBitmaps. The captured bitmap's pixels are stored in 32bit RGB order; when parsing the image the 4th byte (alpha channel) of every pixel must be ignored as it is used only for padding. In .NET, the constant System.Drawing.Imaging.PixelFormat.Format32bppRgb can be used for this purpose. (Inherited from TestObject)
ChangeCheckbox This method emulates changing a checkbox state.
CollapseNode This function closes the node with the key nodeKey.
DefaultContextMenu This method requests a context menu for the whole Tree Control.
DoubleSelectItem This function emulates double clicking on a text item.
DoubleSelectNode This function emulates double clicking a node.
EnsureVisibleHorizontalItem This function scrolls the Tree horizontally until the Item is visible.
Exists Checks if any child object matching the locator exists for an object in the application under test. If the timeout parameter is passed the agent retries finding until the given timeout expires. If no timeout is specified and no object is found initially false is returned immediately. (Inherited from TestObject)
Exists Checks if an object exists in the application under test. (Inherited from TestObject)
ExpandNode This function expands the node with the key nodeKey.
Find Finds an object specified by an XPath locator. (Inherited from TestObject)
FindAll Finds all objects specified by an XPath locator. (Inherited from TestObject)
FindNodeKeyByPath Return the node key for the given path (e.g. 2\1\2).
GenerateLocator Returns a locator for this object. (Inherited from TestObject)
GetAbapImage Gets the abap image.
GetCheckBoxState Retrieves the CheckBox state (true = Checked, false = Unchecked).
GetChildren Returns the child objects of this object. (Inherited from TestObject)
GetColumnIndexFromName Gets the column index for the given name.
GetColumnKeys The keys of all the items in the given column.
GetColumnTitleFromName Gets the column title for the given name.
GetDynamicMethodList Returns a list of methods (including their signature) that can be dynamically invoked on this TestObject. (Inherited from TestObject)
GetHierarchyLevel Gets the hierarchy level for the given key.
GetItemHeight Returns the current item height.
GetItemLeft The left position of the component.
GetItemStyle The style of the given item.
GetItemText For multi column trees, this function returns the text of the item specified by the key and name parameters.
GetItemTextColor Returns the item text color.
GetItemTooltip Returns the item tooltip text.
GetItemTop The top position of the component.
GetItemType Returns the type of the given node.
GetItemWidth Returns the current item width.
GetListTreeNodeItemCount Returns the node item count.
GetNextNodeKey Returns the key of the next node.
GetNodeAbapImage Returns the abap image for the given node.
GetNodeChildrenCount This function returns the number of children of the node given.
GetNodeChildrenCountByPath This function returns the number of children of the node given by the path parameter (e.g. 2\1\2).
GetNodeHeight The current height of the node.
GetNodeIndex The index of the given node.
GetNodeItemHeaders Returns the headers for the given node.
GetNodeLeft The left position of the component.
GetNodePathByKey Given a node key, the path is retrieved (e.g. 2\1\2).
GetNodeStyle Returns the style of the node.
GetNodeText This function returns the text of the node specified by the given key.
GetNodeTextByPath The text of a node defined by the given path is returned.
GetNodeTextColor Returns the node text color.
GetNodeTooltip Returns the node tooltip text.
GetNodeTop The top position of the component.
GetNodeWidth Returns the current node width.
GetParent Looks up the parent of this object in the test application. (Inherited from TestObject)
GetParentNodeKey Key of the parent node of the node specified by the given key.
GetPreviousNodeKey Key of the previous node of the node specified by the given key.
GetProperty Returns the value of the specified property. (Inherited from TestObject)
GetPropertyList Returns a list of property names that can be retrieved for the given object. (Inherited from TestObject)
GetRect Returns the size and position of this object. Per default the returned coordinates are relative to the parent window that contains this object. (Inherited from TestObject)
GetStyleDescription Returns the description for the given style.
GetSubNodesKeys Collection of the keys of all subnodes of the node specified by the given key.
HeaderContextMenu This method requests a context menu for a header.
HighlightObject Highlights this object. (Inherited from TestObject)
ImageClick Clicks on specified image asset. (Inherited from TestObject)
ImageClickFile Clicks on the specified image. (Inherited from TestObject)
ImageExists Returns whether the specified image asset exists. (Inherited from TestObject)
ImageExistsFile Returns whether the specified image exists. (Inherited from TestObject)
ImageRectangle Returns the object-relative rectangle of the specified image asset. (Inherited from TestObject)
ImageRectangleFile Returns the object-relative rectangle of the specified image. (Inherited from TestObject)
Invoke Dynamically invokes a method on the test object. (Inherited from TestObject)
InvokeMethods Dynamically invokes a sequence of methods starting at this TestObject. (Inherited from TestObject)
IsFocused Return whether the control has focus. (Inherited from IFocusable)
IsFolder Whether the given node is a folder.
IsFolderExpandable Whether the folder is expandable.
IsFolderExpanded Whether the folder is expanded.
IsHighLighted Whether the node is highlighted.
ItemContextMenu This method requests a context menu for an item.
NodeContextMenu This method requests a context menu for a node.
PressKey This method emulates pressing a key.
SelectButton This method emulates pressing a button.
SelectColumn This function adds a column to the column selection. A node or item selection is removed.
SelectContextMenuItem Select an item from the controls context menu. (Inherited from ISapContextMenuable)
SelectContextMenuItemByPosition This method allows you to select a context menu item using the position of the item. (Inherited from ISapContextMenuable)
SelectContextMenuItemByText Select a menu item of a context menu using the text of the item and possible higher level menus. (Inherited from ISapContextMenuable)
SelectHeader This method emulates clicking a header.
SelectItem This function emulates the selection of an item. This selection removes all other selections.
SelectLink This function emulates triggering a link.
SelectNode The node with the key nodeKey is added to the Node Selection.
SetCheckBoxState Changes the state of the checkbox in the given node.
SetColumnOrder Sets the order of the tree's column.
SetColumnWidth This function sets the width of a column in pixels.
SetFocus Gives focus to the control. (Inherited from IFocusable)
SetHierarchyHeaderWidth Sets the width of the Hierarchy Header in pixels.
SetProperty Sets the value of the specified property. (Inherited from TestObject)
SetSelectedNode Select the given node.
SetTopNode Sets the given key as top node.
ShowContextMenu Shows the context menu of the control. (Inherited from SapComponent)
StartScreenRecording Starts screen recording (Inherited from TestObject)
StopScreenRecording Stops screen recording (Inherited from TestObject)
TextCapture Returns the text in this object's visible area. (Inherited from TestObject)
TextClick Clicks in the center of the specified text. (Inherited from TestObject)
TextExists Returns whether the specified text exists. (Inherited from TestObject)
TextRectangle Returns the object-relative rectangle of the specified text. (Inherited from TestObject)
UnselectAll All selections are removed.
UnselectColumn This function removes a column from the column selection.
UnselectNode The node with the key nodeKey is removed from the Node Selection.
WaitForChildDisappearance Waits until the specified child object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForDisappearance Waits until the object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForObject Waits for an object that matches the specified locator. If no object matches within an timeout an ObjectNotFoundException is thrown. The default timeout is 5 seconds and you can change the timeout by setting the value of the option OPT_WAIT_RESOLVE_OBJDEF. Use WaitForObject if the AUT takes a long time to display a specific object, for example when a transaction is processed before showing any results. By default, an action in the UI does not require a WaitForObject, because of the built-in synchronization. If you receive random timeout errors during normal script execution, consider increasing the default timeout instead of adding WaitForObject statements to your scripts. (Inherited from TestObject)
WaitForProperty Waits until the specified property has the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForPropertyNotEquals Waits until the specified property has a value that is different to the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForScreenshotStable Waits until the control is visually stable and does not change its position, by comparing screenshots taken with the specified interval. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_SCREENSHOT_STABLE will be used. The default interval is 200 milliseconds. An exception is thrown if the timeout is reached. (Inherited from TestObject)