Table of Contents

Interface ITreeView

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

Namespace: HP.LFT.SDK.SAP.GUI
Assembly: HP.LFT.SDK.dll
Syntax
public interface ITreeView : IElement, ITestObject, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IEnabledProvider

Properties

SelectedItem

The value of the selected item in the tree node.

Declaration
string SelectedItem { get; }
Property Value
Type Description
string

SelectedNodePath

The path to the selected node. The semicolon delimited list of nodes in the path.

Declaration
string SelectedNodePath { get; }
Property Value
Type Description
string

SelectionMode

Indicates which selections can be made in the tree.

Declaration
TreeSelectionMode SelectionMode { get; }
Property Value
Type Description
TreeSelectionMode

TreeType

Indicates the type of tree.

Declaration
TreeType TreeType { get; }
Property Value
Type Description
TreeType

Methods

ActivateNode(ITreeViewNode)

Activates the provided node in the tree.

Declaration
void ActivateNode(ITreeViewNode node)
Parameters
Type Name Description
ITreeViewNode node

The node.

ActivateNode(string)

Activates the specified node in the tree by path.

Declaration
void ActivateNode(string path)
Parameters
Type Name Description
string path

Nodes in the path can be specified by name or 1-based index in the format "#index".

Remarks

Use the BuildNodePath method to build the path argument.

You can use regular expressions for elements in the path. The format is: RegExp:=(regular expression).

BuildNodePath(params object[])

Returns the path constructed from the specified path elements.

Declaration
string BuildNodePath(params object[] nodePathParts)
Parameters
Type Name Description
object[] nodePathParts

The node path elements can be: logical name (string), full path (string), or 1-based index (int).

Returns
Type Description
string

ClickColumn(string)

Clicks the specified column in this column tree or list tree, by name

Declaration
void ClickColumn(string column)
Parameters
Type Name Description
string column

The name of the column to click.

ClickColumn(uint)

Clicks the specified column in this column tree or list tree, by index.

Declaration
void ClickColumn(uint columnIndex)
Parameters
Type Name Description
uint columnIndex

1-based.

GetNode(string)

Returns the node with the specified path. If the path is not unique, returns the first node with the specified path.

Declaration
ITreeViewNode GetNode(string path)
Parameters
Type Name Description
string path

Elements of the path are separated by semi-colons (;).

Returns
Type Description
ITreeViewNode
Remarks

Use the BuildNodePath method to build the node path string to be used as the path argument for this method.

OpenContextMenu()

Opens a tree's default context menu.

Declaration
void OpenContextMenu()
Remarks

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

OpenHeaderContextMenu(string)

Opens the context menu for a header in this column tree or list tree, by column name.

Declaration
void OpenHeaderContextMenu(string column)
Parameters
Type Name Description
string column

The column name.

Remarks

After opening a context menu, you can use SelectMenuItemById(string) to select a menu item.

OpenHeaderContextMenu(uint)

Opens the context menu for a header in this column tree or list tree, by column index.

Declaration
void OpenHeaderContextMenu(uint columnIndex)
Parameters
Type Name Description
uint columnIndex

1-based.

Remarks

After opening a context menu, you can use SelectMenuItemById(string) to select a menu item.

PressEnter()

Presses the ENTER key.

Declaration
void PressEnter()
Remarks

Set the focus to the tree item or node before invoking.

SelectMenuItemById(string)

Selects the specified menu item from a context menu in a tree.

Declaration
void SelectMenuItemById(string menuItemId)
Parameters
Type Name Description
string menuItemId

The SAP ID of the menu item in string format.

SelectNode(ITreeViewNode)

Selects the provided node in the tree.

Declaration
void SelectNode(ITreeViewNode node)
Parameters
Type Name Description
ITreeViewNode node

The node.

SelectNode(string)

Selects a node in the tree, by path.

Declaration
void SelectNode(string path)
Parameters
Type Name Description
string path

Nodes in the path can be specified by name or 1-based index in the format "#index".

Remarks

Use the BuildNodePath method to build the path argument.

You can use regular expressions for elements in the path. The format is: RegExp:=(regular expression).

Extension Methods

TestObjectExtensions.WaitUntilEnabled<T>(T)
TestObjectExtensions.WaitUntilEnabled<T>(T, int)
TestObjectExtensions.WaitUntilExists<T>(T)
TestObjectExtensions.WaitUntilExists<T>(T, int)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>, int)