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.By
protected P
protected com.codeborne.selenide.SelenideElement
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractOverlay
(org.openqa.selenium.By by, P parentComponent) -
Method Summary
Modifier and TypeMethodDescriptioncom.codeborne.selenide.CheckResult
check
(SpecificCondition condition) Checks whether the current handler matches the passedSpecificCondition
.org.openqa.selenium.By
getBy()
com.codeborne.selenide.SelenideElement
abstract com.codeborne.selenide.ElementsCollection
Scrolls 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, shouldNotHave
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
this
to call fluent API
-
scrollDown
Scrolls the current overlay down to one page.- Returns:
this
to call fluent API
-
getParentComponent
- Returns:
- parent component web-element wrapper
-
check
Description copied from interface:SpecificConditionHandler
Checks whether the current handler matches the passedSpecificCondition
.- Specified by:
check
in interfaceSpecificConditionHandler
- Overrides:
check
in classAbstractSpecificConditionHandler<T extends AbstractOverlay<T,
P>> - Parameters:
condition
- condition to check- Returns:
CheckResult
that containsCheckResult.Verdict.ACCEPT
if the current handler matches the passedSpecificCondition
,CheckResult.Verdict.REJECT
otherwise
-
getVisibleItems
-
getDelegate
public com.codeborne.selenide.SelenideElement getDelegate()- Specified by:
getDelegate
in interfaceSelenideElementWrapper<T extends AbstractOverlay<T,
P>> - Returns:
- original wrapped
SelenideElement
-
getVisibleElements
public abstract com.codeborne.selenide.ElementsCollection getVisibleElements()- Returns:
ElementsCollection
of the visible overlay elements
-