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) booleancontainsText(String textValue) booleancontainsText(org.openqa.selenium.WebElement element, String textValue) org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver>doWait()booleanelementIsCurrentlyVisible(org.openqa.selenium.By byElementCriteria) booleanelementIsDisplayed(org.openqa.selenium.By byElementCriteria) booleanelementIsPresent(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>
TvoidsetWaitForTimeout(Duration waitForTimeout) org.openqa.selenium.support.ui.WebDriverWaitthenWait()<T> TwaitFor(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> TwaitFor(org.openqa.selenium.support.ui.ExpectedCondition<T> expectedCondition) waitFor(org.openqa.selenium.WebElement webElement) voidwaitForAbsenceOf(String xpathOrCssSelector) voidwaitForAllTextToAppear(String... expectedTexts) voidwaitForAnyRenderedElementOf(org.openqa.selenium.By[] expectedElements) voidwaitForAnyTextToAppear(String... expectedTexts) voidwaitForAnyTextToAppear(org.openqa.selenium.WebElement element, String... expectedTexts) ThucydidesFluentWait<org.openqa.selenium.WebDriver>waitForElementForUpTo(long timeoutInSeconds) voidwaitForElementsToDisappear(org.openqa.selenium.By byElementCriteria) org.openqa.selenium.WebElementwaitForPresenceOf(org.openqa.selenium.By byElementCriteria) This method will wait until an element is present on the screen, though not necessarily visible.voidwaitForText(String expectedText) voidwaitForText(org.openqa.selenium.WebElement element, String expectedText) voidwaitForTextToAppear(String expectedText, long timeout) voidwaitForTextToDisappear(String expectedText, long timeout) voidwaitForTitle(String expectedTitle) voidwaitForTitleToDisappear(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
-