Package net.serenitybdd.core.pages
Class RenderedPageObjectView
java.lang.Object
net.serenitybdd.core.pages.RenderedPageObjectView
public class RenderedPageObjectView
extends java.lang.Object
A page view that handles checking and waiting for element visibility.
-
Constructor Summary
Constructors Constructor Description RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, long waitForTimeoutInMilliseconds)
RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, java.time.Duration waitForTimeout, boolean timeoutCanBeOverriden)
-
Method Summary
Modifier and Type Method Description static java.util.function.Function<PageObject,java.util.List<WebElementFacade>>
containingTextAndMatchingCSS(java.lang.String cssOrXPathLocator, java.lang.String expectedText)
static java.util.function.Function<PageObject,java.util.List<WebElementFacade>>
containingTextAndMatchingCSS(java.util.List<java.lang.String> cssOrXPathLocators, java.lang.String expectedText)
boolean
containsText(java.lang.String textValue)
boolean
containsText(org.openqa.selenium.WebElement element, java.lang.String textValue)
org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver>
doWait()
boolean
elementIsCurrentlyVisible(org.openqa.selenium.By byElementCriteria)
boolean
elementIsDisplayed(org.openqa.selenium.By byElementCriteria)
boolean
elementIsPresent(org.openqa.selenium.By byElementCriteria)
WebElementFacade
find(java.lang.String xpathOrCssSelector)
WebElementFacade
find(java.lang.String xpathOrCssSelector, java.lang.Object firstArgument, java.lang.Object... arguments)
WebElementFacade
find(org.openqa.selenium.By bySelector)
java.util.List<WebElementFacade>
findAll(java.lang.String xpathOrCssSelector)
java.util.List<WebElementFacade>
findAll(org.openqa.selenium.By bySelector)
java.util.List<WebElementFacade>
findAllWithNoWait(org.openqa.selenium.By bySelector)
protected java.util.List<WebElementFacade>
findAllWithOptionalWait(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions)
java.util.List<WebElementFacade>
findFirstMatching(java.util.List<java.lang.String> xpathOrCssSelectors)
java.time.Duration
getWaitForTimeout()
<T extends WebElementFacade>
TmoveTo(java.lang.String xpathOrCssSelector)
void
setWaitForTimeout(java.time.Duration waitForTimeout)
org.openqa.selenium.support.ui.WebDriverWait
thenWait()
WebElementFacade
waitFor(java.lang.String xpathOrCssSelector)
<T> T
waitFor(java.lang.String message, org.openqa.selenium.support.ui.ExpectedCondition<T> expectedCondition)
java.util.List<WebElementFacade>
waitFor(java.util.List<WebElementFacade> webElements)
WebElementFacade
waitFor(WebElementFacade webElement)
WebElementFacade
waitFor(org.openqa.selenium.By byElementCriteria)
This method will wait until an element is present and visible on the screen.<T> T
waitFor(org.openqa.selenium.support.ui.ExpectedCondition<T> expectedCondition)
WebElementFacade
waitFor(org.openqa.selenium.WebElement webElement)
void
waitForAbsenceOf(java.lang.String xpathOrCssSelector)
void
waitForAllTextToAppear(java.lang.String... expectedTexts)
void
waitForAnyRenderedElementOf(org.openqa.selenium.By[] expectedElements)
void
waitForAnyTextToAppear(java.lang.String... expectedTexts)
void
waitForAnyTextToAppear(org.openqa.selenium.WebElement element, java.lang.String... expectedTexts)
ThucydidesFluentWait<org.openqa.selenium.WebDriver>
waitForCondition()
WebElementFacadeWait
waitForElement()
WebElementFacadeWait
waitForElementForUpTo(long timeoutInSeconds)
void
waitForElementsToDisappear(org.openqa.selenium.By byElementCriteria)
org.openqa.selenium.WebElement
waitForPresenceOf(org.openqa.selenium.By byElementCriteria)
This method will wait until an element is present on the screen, though not necessarily visible.void
waitForText(java.lang.String expectedText)
void
waitForText(org.openqa.selenium.WebElement element, java.lang.String expectedText)
void
waitForTextToAppear(java.lang.String expectedText, long timeout)
void
waitForTextToDisappear(java.lang.String expectedText, long timeout)
void
waitForTitle(java.lang.String expectedTitle)
void
waitForTitleToDisappear(java.lang.String expectedTitle)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RenderedPageObjectView
public RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, long waitForTimeoutInMilliseconds) -
RenderedPageObjectView
public RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, java.time.Duration waitForTimeout, boolean timeoutCanBeOverriden)
-
-
Method Details
-
waitForCondition
-
doWait
public org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> doWait() -
waitFor
This method will wait until an element is present and visible on the screen. -
waitFor
public <T> T waitFor(org.openqa.selenium.support.ui.ExpectedCondition<T> expectedCondition) -
waitFor
public <T> T waitFor(java.lang.String message, org.openqa.selenium.support.ui.ExpectedCondition<T> expectedCondition) -
waitFor
-
waitFor
-
waitFor
-
waitFor
-
waitForPresenceOf
public org.openqa.selenium.WebElement waitForPresenceOf(org.openqa.selenium.By byElementCriteria)This method will wait until an element is present on the screen, though not necessarily visible. -
elementIsPresent
public boolean elementIsPresent(org.openqa.selenium.By byElementCriteria) -
elementIsDisplayed
public boolean elementIsDisplayed(org.openqa.selenium.By byElementCriteria) -
elementIsCurrentlyVisible
public boolean elementIsCurrentlyVisible(org.openqa.selenium.By byElementCriteria) -
waitForText
public void waitForText(java.lang.String expectedText) -
thenWait
public org.openqa.selenium.support.ui.WebDriverWait thenWait() -
waitForText
public void waitForText(org.openqa.selenium.WebElement element, java.lang.String expectedText) -
waitForTitle
public void waitForTitle(java.lang.String expectedTitle) -
containsText
public boolean containsText(java.lang.String textValue) -
containsText
public boolean containsText(org.openqa.selenium.WebElement element, java.lang.String textValue) -
waitForTextToDisappear
public void waitForTextToDisappear(java.lang.String expectedText, long timeout) -
waitForTextToAppear
public void waitForTextToAppear(java.lang.String expectedText, long timeout) -
waitForTitleToDisappear
public void waitForTitleToDisappear(java.lang.String expectedTitle) -
waitForAnyTextToAppear
public void waitForAnyTextToAppear(java.lang.String... expectedTexts) -
waitForAnyTextToAppear
public void waitForAnyTextToAppear(org.openqa.selenium.WebElement element, java.lang.String... expectedTexts) -
waitForAbsenceOf
public void waitForAbsenceOf(java.lang.String xpathOrCssSelector) -
waitForAllTextToAppear
public void waitForAllTextToAppear(java.lang.String... expectedTexts) -
waitForElementsToDisappear
public void waitForElementsToDisappear(org.openqa.selenium.By byElementCriteria) -
waitForAnyRenderedElementOf
public void waitForAnyRenderedElementOf(org.openqa.selenium.By[] expectedElements) -
setWaitForTimeout
public void setWaitForTimeout(java.time.Duration waitForTimeout) -
getWaitForTimeout
public java.time.Duration getWaitForTimeout() -
findAllWithOptionalWait
protected java.util.List<WebElementFacade> findAllWithOptionalWait(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions) -
findAll
-
findAllWithNoWait
-
findAll
-
findFirstMatching
public java.util.List<WebElementFacade> findFirstMatching(java.util.List<java.lang.String> xpathOrCssSelectors) -
containingTextAndMatchingCSS
public static java.util.function.Function<PageObject,java.util.List<WebElementFacade>> containingTextAndMatchingCSS(java.lang.String cssOrXPathLocator, java.lang.String expectedText) -
containingTextAndMatchingCSS
public static java.util.function.Function<PageObject,java.util.List<WebElementFacade>> containingTextAndMatchingCSS(java.util.List<java.lang.String> cssOrXPathLocators, java.lang.String expectedText) -
find
-
find
-
find
public WebElementFacade find(java.lang.String xpathOrCssSelector, java.lang.Object firstArgument, java.lang.Object... arguments) -
moveTo
-
waitForElement
-
waitForElementForUpTo
-