Package net.serenitybdd.core.pages
Class RenderedPageObjectView
java.lang.Object
net.serenitybdd.core.pages.RenderedPageObjectView
A page view that handles checking and waiting for element visibility.
-
Constructor Summary
ConstructorsConstructorDescriptionRenderedPageObjectView
(org.openqa.selenium.WebDriver driver, PageObject pageObject, long waitForTimeoutInMilliseconds) RenderedPageObjectView
(org.openqa.selenium.WebDriver driver, PageObject pageObject, Duration waitForTimeout, boolean timeoutCanBeOverriden) -
Method Summary
Modifier and TypeMethodDescriptionstatic Function<PageObject,
List<WebElementFacade>> containingTextAndMatchingCSS
(String cssOrXPathLocator, String expectedText) static Function<PageObject,
List<WebElementFacade>> containingTextAndMatchingCSS
(List<String> cssOrXPathLocators, String expectedText) boolean
containsText
(String textValue) boolean
containsText
(org.openqa.selenium.WebElement element, 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) find
(org.openqa.selenium.By bySelector) findAll
(org.openqa.selenium.By bySelector) findAllWithNoWait
(org.openqa.selenium.By bySelector) protected List<WebElementFacade>
findAllWithOptionalWait
(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions) findFirstMatching
(List<String> xpathOrCssSelectors) <T extends WebElementFacade>
Tvoid
setWaitForTimeout
(Duration waitForTimeout) org.openqa.selenium.support.ui.WebDriverWait
thenWait()
<T> T
waitFor
(List<WebElementFacade> webElements) waitFor
(WebElementFacade webElement) 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) waitFor
(org.openqa.selenium.WebElement webElement) void
waitForAbsenceOf
(String xpathOrCssSelector) void
waitForAllTextToAppear
(String... expectedTexts) void
waitForAnyRenderedElementOf
(org.openqa.selenium.By[] expectedElements) void
waitForAnyTextToAppear
(String... expectedTexts) void
waitForAnyTextToAppear
(org.openqa.selenium.WebElement element, String... expectedTexts) ThucydidesFluentWait<org.openqa.selenium.WebDriver>
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
(String expectedText) void
waitForText
(org.openqa.selenium.WebElement element, String expectedText) void
waitForTextToAppear
(String expectedText, long timeout) void
waitForTextToDisappear
(String expectedText, long timeout) void
waitForTitle
(String expectedTitle) void
waitForTitleToDisappear
(String expectedTitle)
-
Constructor Details
-
RenderedPageObjectView
public RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, long waitForTimeoutInMilliseconds) -
RenderedPageObjectView
public RenderedPageObjectView(org.openqa.selenium.WebDriver driver, PageObject pageObject, 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(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
-
thenWait
public org.openqa.selenium.support.ui.WebDriverWait thenWait() -
waitForText
-
waitForTitle
-
containsText
-
containsText
-
waitForTextToDisappear
-
waitForTextToAppear
-
waitForTitleToDisappear
-
waitForAnyTextToAppear
-
waitForAnyTextToAppear
-
waitForAbsenceOf
-
waitForAllTextToAppear
-
waitForElementsToDisappear
public void waitForElementsToDisappear(org.openqa.selenium.By byElementCriteria) -
waitForAnyRenderedElementOf
public void waitForAnyRenderedElementOf(org.openqa.selenium.By[] expectedElements) -
setWaitForTimeout
-
getWaitForTimeout
-
findAllWithOptionalWait
protected List<WebElementFacade> findAllWithOptionalWait(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions) -
findAll
-
findAllWithNoWait
-
findAll
-
findFirstMatching
-
containingTextAndMatchingCSS
public static Function<PageObject,List<WebElementFacade>> containingTextAndMatchingCSS(String cssOrXPathLocator, String expectedText) -
containingTextAndMatchingCSS
public static Function<PageObject,List<WebElementFacade>> containingTextAndMatchingCSS(List<String> cssOrXPathLocators, String expectedText) -
find
-
find
-
find
-
moveTo
-
waitForElement
-
waitForElementForUpTo
-