Class BaseComponent
- java.lang.Object
-
- com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
-
- Direct Known Subclasses:
ActionComponent,AEMBaseComponent
public class BaseComponent extends java.lang.ObjectBase component class for inheritance.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcssSelectorprotected com.codeborne.selenide.SelenideElementcurrentElement
-
Constructor Summary
Constructors Constructor Description BaseComponent(com.codeborne.selenide.SelenideElement element)BaseComponent(java.lang.String selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends BaseComponent>
TadaptTo(java.lang.Class<T> adapterClass)<T extends BaseComponent>
Tclick()Simply click on that object.com.codeborne.selenide.SelenideElementelement()java.lang.StringgetCssSelector()booleanisExisting()booleanisVisible()Check if the element is visible in browser.booleanisVisibleWithinViewport()<T extends BaseComponent>
Trender()Wait for the element to finish rendering.<T extends BaseComponent>
TscrollTo()shortcut on the element().scrollTo().<T extends BaseComponent>
TwaitDisabled()Wait on the element for the Condition.disabled to be true with default timeout.<T extends BaseComponent>
TwaitEnabled()Wait on the element for the Condition.enabled to be true with default timeout.<T extends BaseComponent>
TwaitReady()wait ready (coral wize).<T extends BaseComponent>
TwaitVanish()Wait on the element for the Condition.visible to be false with default timeout.<T extends BaseComponent>
TwaitVisible()Wait on the element for the animation to finish and Condition.visible to be true with default timeout.
-
-
-
Method Detail
-
isExisting
public boolean isExisting()
- Returns:
- true if it exists.
-
isVisibleWithinViewport
public boolean isVisibleWithinViewport()
- Returns:
- true if visible and in the viewport.
-
isVisible
public boolean isVisible()
Check if the element is visible in browser.- Returns:
- true if element is currently visible.
-
waitVisible
public <T extends BaseComponent> T waitVisible()
Wait on the element for the animation to finish and Condition.visible to be true with default timeout.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
waitVanish
public <T extends BaseComponent> T waitVanish()
Wait on the element for the Condition.visible to be false with default timeout.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
waitEnabled
public <T extends BaseComponent> T waitEnabled()
Wait on the element for the Condition.enabled to be true with default timeout.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
waitDisabled
public <T extends BaseComponent> T waitDisabled()
Wait on the element for the Condition.disabled to be true with default timeout.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
render
public <T extends BaseComponent> T render()
Wait for the element to finish rendering. This method might get extended with custom rules for complex Components.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
click
public <T extends BaseComponent> T click()
Simply click on that object.- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
getCssSelector
public java.lang.String getCssSelector()
- Returns:
- the original cssSelector.
-
scrollTo
public <T extends BaseComponent> T scrollTo()
shortcut on the element().scrollTo().- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
element
public com.codeborne.selenide.SelenideElement element()
- Returns:
- currentElement.
-
waitReady
public <T extends BaseComponent> T waitReady()
wait ready (coral wize).- Type Parameters:
T- Component extendingBaseComponent- Returns:
- Instance of Current Component
-
adaptTo
public <T extends BaseComponent> T adaptTo(java.lang.Class<T> adapterClass)
-
-