Class AbstractMenu<M>

Type Parameters:
M - inheritor menu class type
All Implemented Interfaces:
SpecificConditionHandler, ByLocator, SelenideElementWrapper<M>
Direct Known Subclasses:
HorizontalMenu, ListMenu

public abstract class AbstractMenu<M> extends AbstractComponent<M>
Abstract class for menu web-element wrappers. Supports opening menu items by UI_TEST_ID path.
  • Constructor Details

    • AbstractMenu

      protected AbstractMenu(org.openqa.selenium.By by)
  • Method Details

    • openItem

      public <T extends Composite<T>> T openItem(Class<T> compositeClass, String... path)
      Clicks on the menu items in sequence along the passed path and returns the open composite (view).
      Type Parameters:
      T - composite class type
      Parameters:
      compositeClass - composite class to wire and return
      path - path of the menu items UI_TEST_ID attributes
      Returns:
      wired web-element wrapper for opened composite
    • openItem

      public <T extends Composite<T>> T openItem(MenuItem<T> menuItem)
      Clicks on the menu items in sequence along the passed MenuItem and returns the open composite (view).
      Type Parameters:
      T - composite class type
      Parameters:
      menuItem - menu item information object
      Returns:
      wired web-element wrapper for opened composite
    • openItem

      public abstract void openItem(String... path)
      Clicks on the menu items in sequence along the passed path
      Parameters:
      path - path of menu items