Table of Contents

Interface IToolBar

A .NET Windows Forms toolbar.

Inherited Members
IUiObjectBase.FireEvent(string, params object[])
IUiObjectBase.GetObjectProperty<TValue>(string)
IUiObjectBase.IsChildWindow
IUiObjectBase.IsOwnedWindow
IUiObjectBase.ObjectName
IUiObjectBase.FullNamePath
IUiObjectBase.FullType
IUiObjectBase.Text
IUiObjectBase.WindowClassRegExp
IUiObjectBase.WindowId
IUiObjectBase.MouseMove(Location)
IUiObjectBase.IsFocused
IUiObjectBase.NativeClass
IUiObjectBase.WindowTitleRegExp
IUiObjectBase.Handle
IClickable.Click(MouseButton)
IClickable.Click(ClickArgs)
IDoubleClickable.DoubleClick(MouseButton)
IDoubleClickable.DoubleClick(ClickArgs)
ILocationInfoProvider.Location
ILocationInfoProvider.AbsoluteLocation
ILocationInfoProvider.Size
ISupportSendKeys.SendKeys(string, KeyModifier)
ISupportSendKeys.SendKeys(string)
ISupportDragAndDrop.DragAndDropOn(ISupportDragAndDrop)
ISupportDragAndDrop.DragAndDropOn(ISupportDragAndDrop, DragAndDropArgs)
IEnabledProvider.IsEnabled
IVisibleProvider.IsVisible
ISupportsNativeObject.NativeObject
ITestObject.GetDescription()
ITestObject.SetDescription(IDescription)
ITestObject.FindChildren<TChild>(IDescription)
ITestObject.Exists()
ITestObject.Exists(uint)
ITestObject.GetSnapshot()
ITestObject.Highlight()
ITestObject.HighlightMatches<TChild>(IDescription)
ITestObject.GetTextLocations(string)
ITestObject.GetTextLocations(string, Rectangle)
ITestObject.GetVisibleText()
ITestObject.GetVisibleText(Rectangle)
ITestObject.VerifyImageExists(Image, byte)
ITestObject.VerifyImageMatch(Image, byte, byte)
ITestObject.VerifyImageMatch(Image, ImageMaskArea, byte, byte)
ITestObject.CallFTMethod(string, params object[])
ITestObject.CallFTMethod<TResult>(string, params object[])
ITestObject.Parent
ITestObject.DisplayName
ITestObjectDescriber.Describe<TChild>(IDescription)
Namespace: HP.LFT.SDK.WinForms
Assembly: HP.LFT.SDK.dll
Syntax
public interface IToolBar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber
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.

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

Items

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

Declaration
ReadOnlyCollection<IToolBarItem> Items { get; }
Property Value
Type Description
ReadOnlyCollection<IToolBarItem>

SelectedItems

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

Declaration
ReadOnlyCollection<IToolBarItem> SelectedItems { get; }
Property Value
Type Description
ReadOnlyCollection<IToolBarItem>

TopMenuItems

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

Declaration
ReadOnlyCollection<string> TopMenuItems { get; }
Property Value
Type Description
ReadOnlyCollection<string>

Methods

GetItem(string)

Retrieves the item with the specified text.

Declaration
IToolBarItem GetItem(string text)
Parameters
Type Name Description
string text

The text.

Returns
Type Description
IToolBarItem

IsItemExists(string)

Indicates whether the specified toolbar button or menu button exists.

Declaration
bool IsItemExists(string itemPath)
Parameters
Type Name Description
string itemPath

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

Returns
Type Description
bool

Select(string)

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

Declaration
void Select(string itemPath)
Parameters
Type Name Description
string itemPath

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.

Declaration
void ShowDropdown(int index)
Parameters
Type Name Description
int index

The 0-based index of the button.

ShowDropdown(string)

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

Declaration
void ShowDropdown(string itemPath)
Parameters
Type Name Description
string itemPath

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

Extension Methods

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