Package net.serenitybdd.core.pages
Class RenderedPageObjectView
- java.lang.Object
-
- net.serenitybdd.core.pages.RenderedPageObjectView
-
public class RenderedPageObjectView extends 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, Duration waitForTimeout, boolean timeoutCanBeOverriden)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
WebElementFacade
find(String xpathOrCssSelector)
WebElementFacade
find(org.openqa.selenium.By bySelector)
List<WebElementFacade>
findAll(String xpathOrCssSelector)
List<WebElementFacade>
findAll(org.openqa.selenium.By bySelector)
List<WebElementFacade>
findAllWithNoWait(org.openqa.selenium.By bySelector)
protected List<WebElementFacade>
findAllWithOptionalWait(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions)
Duration
getWaitForTimeout()
<T extends WebElementFacade>
TmoveTo(String xpathOrCssSelector)
void
setWaitForTimeout(Duration waitForTimeout)
org.openqa.selenium.support.ui.WebDriverWait
thenWait()
void
waitFor(String xpathOrCssSelector)
void
waitFor(String message, org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebDriver> expectedCondition)
List<WebElementFacade>
waitFor(List<WebElementFacade> webElements)
WebElementFacade
waitFor(WebElementFacade webElement)
void
waitFor(org.openqa.selenium.By byElementCriteria)
This method will wait until an element is present and visible on the screen.void
waitFor(org.openqa.selenium.support.ui.ExpectedCondition expectedCondition)
WebElementFacade
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>
waitForCondition()
WebElementFacadeWait
waitForElement()
WebElementFacadeWait
waitForElementForUpTo(long timeoutInSeconds)
void
waitForElementsToDisappear(org.openqa.selenium.By byElementCriteria)
void
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 Detail
-
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 Detail
-
waitForCondition
public ThucydidesFluentWait<org.openqa.selenium.WebDriver> waitForCondition()
-
doWait
public org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> doWait()
-
waitFor
public void waitFor(org.openqa.selenium.By byElementCriteria)
This method will wait until an element is present and visible on the screen.
-
waitFor
public void waitFor(org.openqa.selenium.support.ui.ExpectedCondition expectedCondition)
-
waitFor
public void waitFor(String message, org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebDriver> expectedCondition)
-
waitFor
public void waitFor(String xpathOrCssSelector)
-
waitFor
public WebElementFacade waitFor(org.openqa.selenium.WebElement webElement)
-
waitFor
public WebElementFacade waitFor(WebElementFacade webElement)
-
waitFor
public List<WebElementFacade> waitFor(List<WebElementFacade> webElements)
-
waitForPresenceOf
public void 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(String expectedText)
-
thenWait
public org.openqa.selenium.support.ui.WebDriverWait thenWait()
-
waitForText
public void waitForText(org.openqa.selenium.WebElement element, String expectedText)
-
waitForTitle
public void waitForTitle(String expectedTitle)
-
containsText
public boolean containsText(String textValue)
-
containsText
public boolean containsText(org.openqa.selenium.WebElement element, String textValue)
-
waitForTextToDisappear
public void waitForTextToDisappear(String expectedText, long timeout)
-
waitForTextToAppear
public void waitForTextToAppear(String expectedText, long timeout)
-
waitForTitleToDisappear
public void waitForTitleToDisappear(String expectedTitle)
-
waitForAnyTextToAppear
public void waitForAnyTextToAppear(String... expectedTexts)
-
waitForAnyTextToAppear
public void waitForAnyTextToAppear(org.openqa.selenium.WebElement element, String... expectedTexts)
-
waitForAbsenceOf
public void waitForAbsenceOf(String xpathOrCssSelector)
-
waitForAllTextToAppear
public void waitForAllTextToAppear(String... expectedTexts)
-
waitForElementsToDisappear
public void waitForElementsToDisappear(org.openqa.selenium.By byElementCriteria)
-
waitForAnyRenderedElementOf
public void waitForAnyRenderedElementOf(org.openqa.selenium.By[] expectedElements)
-
setWaitForTimeout
public void setWaitForTimeout(Duration waitForTimeout)
-
getWaitForTimeout
public Duration getWaitForTimeout()
-
findAllWithOptionalWait
protected List<WebElementFacade> findAllWithOptionalWait(org.openqa.selenium.By bySelector, FindAllWaitOptions waitForOptions)
-
findAll
public List<WebElementFacade> findAll(org.openqa.selenium.By bySelector)
-
findAllWithNoWait
public List<WebElementFacade> findAllWithNoWait(org.openqa.selenium.By bySelector)
-
findAll
public List<WebElementFacade> findAll(String xpathOrCssSelector)
-
find
public WebElementFacade find(org.openqa.selenium.By bySelector)
-
find
public WebElementFacade find(String xpathOrCssSelector)
-
moveTo
public <T extends WebElementFacade> T moveTo(String xpathOrCssSelector)
-
waitForElement
public WebElementFacadeWait waitForElement()
-
waitForElementForUpTo
public WebElementFacadeWait waitForElementForUpTo(long timeoutInSeconds)
-
-