Package io.jmix.masquerade.component
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 typeP- 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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.openqa.selenium.Byprotected Pprotected com.codeborne.selenide.SelenideElement -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOverlay(org.openqa.selenium.By by, P parentComponent) -
Method Summary
Modifier and TypeMethodDescriptioncom.codeborne.selenide.CheckResultcheck(SpecificCondition condition) Checks whether the current handler matches the passedSpecificCondition.org.openqa.selenium.BygetBy()com.codeborne.selenide.SelenideElementabstract com.codeborne.selenide.ElementsCollectionScrolls the current overlay down to one page.scrollUp()Scrolls the current overlay up to one page.Methods inherited from class io.jmix.masquerade.component.AbstractSpecificConditionHandler
should, should, shouldBe, shouldBe, shouldHave, shouldHave, shouldNot, shouldNot, shouldNotBe, shouldNotBe, shouldNotHave, shouldNotHaveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.masquerade.sys.SelenideElementWrapper
disabled, displayed, enabled, exists, shouldHaveAttribute, shouldHaveAttributeValue, shouldHaveCss, shouldHaveCssValue, shouldNotHaveAttribute, shouldNotHaveAttributeValue, shouldNotHaveCss, shouldNotHaveCssValue
-
Field Details
-
by
protected org.openqa.selenium.By by -
wrappedElement
protected com.codeborne.selenide.SelenideElement wrappedElement -
parentComponent
-
-
Constructor Details
-
AbstractOverlay
-
-
Method Details
-
getBy
public org.openqa.selenium.By getBy() -
scrollUp
Scrolls the current overlay up to one page.- Returns:
thisto call fluent API
-
scrollDown
Scrolls the current overlay down to one page.- Returns:
thisto call fluent API
-
getParentComponent
- Returns:
- parent component web-element wrapper
-
check
Description copied from interface:SpecificConditionHandlerChecks whether the current handler matches the passedSpecificCondition.- Specified by:
checkin interfaceSpecificConditionHandler- Overrides:
checkin classAbstractSpecificConditionHandler<T extends AbstractOverlay<T,P>> - Parameters:
condition- condition to check- Returns:
CheckResultthat containsCheckResult.Verdict.ACCEPTif the current handler matches the passedSpecificCondition,CheckResult.Verdict.REJECTotherwise
-
getVisibleItems
-
getDelegate
public com.codeborne.selenide.SelenideElement getDelegate()- Specified by:
getDelegatein interfaceSelenideElementWrapper<T extends AbstractOverlay<T,P>> - Returns:
- original wrapped
SelenideElement
-
getVisibleElements
public abstract com.codeborne.selenide.ElementsCollection getVisibleElements()- Returns:
ElementsCollectionof the visible overlay elements
-