Interface ToolBar

All Superinterfaces:
Clickable, DoubleClickable, EnabledProvider, LocationInfoProvider, SupportDragAndDrop, SupportSendKeys, SupportsNativeObject, TestObject, TestObjectDescriber, UiObjectBase, UiObjectBase, VisibleProvider, WaitUntilEnabledProvider, WaitUntilVisibleProvider

public interface ToolBar extends UiObjectBase, TestObject
A .NET Windows Forms toolbar.
A .NET Windows Forms menu is also known as a ToolBar test object.
  • Method Details

    • getTopMenuItems

      List<String> getTopMenuItems() throws GeneralLeanFtException
      For menu: returns the names of all top menu items; For toolbar: returns the names of all toolbar items.
      Returns:
      the names of top menu items
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getItems

      Returns the toolbar items in this toolbar.
      Do not invoke on a menu.
      Returns:
      the toolbar items
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getSelectedItems

      List<ToolBarItem> getSelectedItems() throws GeneralLeanFtException
      Returns the selected items in this toolbar.
      Do not invoke on a menu.
      Returns:
      the selected items
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • select

      void select(String itemPath) throws GeneralLeanFtException
      Selects the specified item in this menu.
      Do not invoke on a toolbar.
      Only visible items can be selected. You can use showDropdown(int) or showDropdown(String) to make the button visible.
      Parameters:
      itemPath - The full path of the menu item is a list of menu button names separated by semicolons.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • showDropdown

      void showDropdown(String itemPath) throws GeneralLeanFtException
      Opens the dropdown menu associated with this menu item or toolbar item.
      Parameters:
      itemPath - The full path of the item. The full path of a menu item is a list of menu item names separated by semicolons.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • showDropdown

      void showDropdown(int index) throws GeneralLeanFtException
      Opens the dropdown menu associated with this toolbar button.
      Do not invoke on a menu.
      Parameters:
      index - the 0-based index of the button
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • isItemExists

      boolean isItemExists(String itemPath) throws GeneralLeanFtException
      Indicates whether the specified toolbar button or menu button exists.
      Parameters:
      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:
      true if exists
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getErrorText

      String getErrorText() throws GeneralLeanFtException
      Returns the tooltip text of the error icon associated with this object.
      Returns:
      the tooltip text
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getItem

      Returns the item with the specified text.
      Parameters:
      text - the item text
      Returns:
      the item with the specified text.
      Throws:
      GeneralLeanFtException - if error occurs during execution