Class AbstractOverlay<T extends AbstractOverlay<T,P>,P extends AbstractComponent<P>>

java.lang.Object
io.jmix.masquerade.component.AbstractSpecificConditionHandler<T>
io.jmix.masquerade.component.AbstractOverlay<T,P>
Type Parameters:
T - inheritor overlay class type
P - parent web-element wrapper class type
All Implemented Interfaces:
SpecificConditionHandler, ByLocator, SelenideElementWrapper<T>
Direct Known Subclasses:
ComboBoxOverlay, MenuBarOverlay, SelectOverlay

public abstract class AbstractOverlay<T extends AbstractOverlay<T,P>,P extends AbstractComponent<P>> extends AbstractSpecificConditionHandler<T> implements ByLocator
Abstract class for overlays. Supports scrolling, VisibleItems, VisibleItemsContains, VisibleItemsCount condition checking.
  • Field Details

    • by

      protected org.openqa.selenium.By by
    • wrappedElement

      protected com.codeborne.selenide.SelenideElement wrappedElement
    • parentComponent

      protected P extends AbstractComponent<P> parentComponent
  • Constructor Details

    • AbstractOverlay

      protected AbstractOverlay(org.openqa.selenium.By by, P parentComponent)
  • Method Details

    • getBy

      public org.openqa.selenium.By getBy()
      Specified by:
      getBy in interface ByLocator
      Returns:
      By selector by which the current web-element can be found
    • scrollUp

      public T scrollUp()
      Scrolls the current overlay up to one page.
      Returns:
      this to call fluent API
    • scrollDown

      public T scrollDown()
      Scrolls the current overlay down to one page.
      Returns:
      this to call fluent API
    • getParentComponent

      public P getParentComponent()
      Returns:
      parent component web-element wrapper
    • check

      public com.codeborne.selenide.CheckResult check(SpecificCondition condition)
      Description copied from interface: SpecificConditionHandler
      Checks whether the current handler matches the passed SpecificCondition.
      Specified by:
      check in interface SpecificConditionHandler
      Overrides:
      check in class AbstractSpecificConditionHandler<T extends AbstractOverlay<T,P>>
      Parameters:
      condition - condition to check
      Returns:
      CheckResult that contains CheckResult.Verdict.ACCEPT if the current handler matches the passed SpecificCondition, CheckResult.Verdict.REJECT otherwise
    • getVisibleItems

      protected List<String> getVisibleItems()
    • getDelegate

      public com.codeborne.selenide.SelenideElement getDelegate()
      Specified by:
      getDelegate in interface SelenideElementWrapper<T extends AbstractOverlay<T,P>>
      Returns:
      original wrapped SelenideElement
    • getVisibleElements

      public abstract com.codeborne.selenide.ElementsCollection getVisibleElements()
      Returns:
      ElementsCollection of the visible overlay elements