Table of Contents

Interface IToolBar

Namespace
HP.LFT.SDK.WinForms
Assembly
HP.LFT.SDK.dll

A .NET Windows Forms toolbar.

public interface IToolBar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber
Inherited Members
Extension Methods

Remarks

A .NET Windows Forms menu is also known as a ToolBar test object.

Properties

ErrorText

Returns the tooltip text of the error icon associated with this object.

string ErrorText { get; }

Property Value

string

Items

Returns the toolbar items in this toolbar. Do not invoke on a menu.

ReadOnlyCollection<IToolBarItem> Items { get; }

Property Value

ReadOnlyCollection<IToolBarItem>

SelectedItems

Returns the selected items in this toolbar. Do not invoke on a menu.

ReadOnlyCollection<IToolBarItem> SelectedItems { get; }

Property Value

ReadOnlyCollection<IToolBarItem>

TopMenuItems

For menu: returns the names of the top menu items.
For toolbar: returns the names of the toolbar buttons.

ReadOnlyCollection<string> TopMenuItems { get; }

Property Value

ReadOnlyCollection<string>

Methods

GetItem(string)

Retrieves the item with the specified text.

IToolBarItem GetItem(string text)

Parameters

text string

The text.

Returns

IToolBarItem

IsItemExists(string)

Indicates whether the specified toolbar button or menu button exists.

bool IsItemExists(string itemPath)

Parameters

itemPath string

The full path of the button. The full path of a menu button is a list of menu button names separated by semicolons.

Returns

bool

Select(string)

Selects the specified item in this menu. Do not invoke on a toolbar.

void Select(string itemPath)

Parameters

itemPath string

The full path of the menu item is a list of
menu button names separated by semicolons.

Remarks

Only visible items can be selected. You can use ShowDropdown(string) or ShowDropdown(int) to make the button visible.

ShowDropdown(int)

Opens the dropdown menu associated with this toolbar button. Do not invoke on a menu.

void ShowDropdown(int index)

Parameters

index int

The 0-based index of the button.

ShowDropdown(string)

Opens the dropdown menu associated with this menu item or toolbar item.

void ShowDropdown(string itemPath)

Parameters

itemPath string

The full path of the item. The full path of a menu item is a list of menu item names separated by semicolons.