Package net.serenitybdd.core.pages
Class PageObject
java.lang.Object
net.serenitybdd.core.pages.PageObject
- Direct Known Subclasses:
AnyPage,PageObject,UIInteractionSteps,UIQuerySteps
public abstract class PageObject
extends java.lang.Object
A base class representing a WebDriver page object.
- Author:
- johnsmart
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPageObject.FieldEntrystatic classPageObject.OpenWithParams -
Constructor Summary
Constructors Modifier Constructor Description protectedPageObject()PageObject(org.openqa.selenium.WebDriver driver)PageObject(org.openqa.selenium.WebDriver driver, int ajaxTimeout)protectedPageObject(org.openqa.selenium.WebDriver driver, com.google.common.base.Predicate<? super PageObject> callback)PageObject(org.openqa.selenium.WebDriver driver, EnvironmentVariables environmentVariables) -
Method Summary
Modifier and Type Method Description <T extends WebElementFacade>
T$(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)<T extends WebElementFacade>
T$(WithByLocator locator)<T extends WebElementFacade>
T$(WithLocator locator)<T extends WebElementFacade>
T$(org.openqa.selenium.By bySelector)<T extends WebElementFacade>
T$(org.openqa.selenium.WebElement webElement)ListOfWebElementFacades$$(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)ListOfWebElementFacades$$(org.openqa.selenium.By bySelector)voidaddJQuerySupport()voidblurActiveElement()voidcallWhenPageOpensMethods()Override this methodvoidclickOn(org.openqa.selenium.WebElement webElement)booleancompatibleWithUrl(java.lang.String currentUrl)Does this page object work for this URL? When matching a URL, we check with and without trailing slashesbooleancontainsAllText(java.lang.String... textValues)Check that the specified text appears somewhere in the page.booleancontainsElements(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)booleancontainsElements(org.openqa.selenium.By bySelector)booleancontainsText(java.lang.String textValue)booleancontainsTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated.use element(webElement).containsText(textValue)protected booleandriverIsInstantiated()protected booleandriverIsJQueryCompatible()<T extends WebElementFacade>
Telement(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)Provides a fluent API for querying web elements.<T extends WebElementFacade>
Telement(org.openqa.selenium.By bySelector)Provides a fluent API for querying web elements.<T extends WebElementFacade>
Telement(org.openqa.selenium.WebElement webElement)Provides a fluent API for querying web elements.PageObject.FieldEntryenter(java.lang.CharSequence... keysToSend)Clear a field and enter a value into it.java.lang.ObjectevaluateJavascript(java.lang.String script)java.lang.ObjectevaluateJavascript(java.lang.String script, java.lang.Object... params)<T extends WebElementFacade>
Tfind(java.lang.String selector)<T extends WebElementFacade>
Tfind(java.util.List<org.openqa.selenium.By> selectors)<T extends WebElementFacade>
Tfind(WithByLocator selector)<T extends WebElementFacade>
Tfind(WithLocator selector)<T extends WebElementFacade>
Tfind(org.openqa.selenium.By selector)ListOfWebElementFacadesfindAll(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)ListOfWebElementFacadesfindAll(WithByLocator bySelector)ListOfWebElementFacadesfindAll(WithLocator bySelector)ListOfWebElementFacadesfindAll(org.openqa.selenium.By bySelector)<T extends WebElementFacade>
TfindBy(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)<T extends WebElementFacade>
TfindBy(java.util.List<java.lang.String> selectors)java.util.stream.Stream<WebElementFacade>findEach(java.lang.String xpathOrCSSSelector)java.util.stream.Stream<WebElementFacade>findEach(java.lang.String... xpathOrCssSelectors)java.util.stream.Stream<WebElementFacade>findEach(WithByLocator bySelector)java.util.stream.Stream<WebElementFacade>findEach(WithLocator bySelector)java.util.stream.Stream<WebElementFacade>findEach(org.openqa.selenium.By bySelector)java.util.stream.Stream<WebElementFacade>findEach(org.openqa.selenium.By... bySelectors)FindEach will return a stream of WebElementFacades matching the described nested structure.java.util.Optional<WebElementFacade>findFirst(java.lang.String xpathOrCSSSelector)java.util.Optional<WebElementFacade>findFirst(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)java.util.Optional<WebElementFacade>findFirst(org.openqa.selenium.By bySelector)<T extends WebElementFacade>
TfindNested(java.lang.String... selectors)<T extends WebElementFacade>
TfindNested(org.openqa.selenium.By... selectors)ListOfWebElementFacadesfindNestedElements(java.lang.String... xpathOrCssSelectors)protected ThucydidesFluentAdapterfluent()org.openqa.selenium.AlertgetAlert()protected SystemClockgetClock()org.openqa.selenium.WebDrivergetDriver()java.time.DurationgetImplicitWaitTimeout()protected JavascriptExecutorFacadegetJavascriptExecutorFacade()protected RenderedPageObjectViewgetRenderedView()java.lang.StringgetSelectedLabelFrom(org.openqa.selenium.WebElement dropdown)java.util.Set<java.lang.String>getSelectedOptionLabelsFrom(org.openqa.selenium.WebElement dropdown)java.util.Set<java.lang.String>getSelectedOptionValuesFrom(org.openqa.selenium.WebElement dropdown)java.lang.StringgetSelectedValueFrom(org.openqa.selenium.WebElement dropdown)java.lang.StringgetTitle()java.time.DurationgetWaitForElementTimeout()Deprecated.java.time.DurationgetWaitForTimeout()booleanhasFocus(org.openqa.selenium.WebElement webElement)Deprecated.Use element(webElement).hasFocus() insteadlongimplicitTimoutMilliseconds()RadioButtonGroupinRadioButtonGroup(java.lang.String name)java.lang.BooleanisElementVisible(org.openqa.selenium.By byCriteria)Returns true if at least one matching element is found on the page and is visible.protected booleanisRelative(java.lang.String startingUrl)booleanmatchesAnyUrl()<T extends WebElementFacade>
TmoveTo(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)<T extends WebElementFacade>
TmoveTo(org.openqa.selenium.By locator)voidnavigateToPageNamed(java.lang.String pageName)voidopen()Open the webdriver browser to the base URL, determined by the DefaultUrl annotation if present.PageObject.OpenWithParamsopen(java.lang.String urlTemplateName)voidopen(java.lang.String[] parameterValues)Open the webdriver browser using a paramaterized URL.voidopen(java.lang.String urlTemplateName, java.lang.String[] parameterValues)voidopenAt(java.lang.String relativeUrl)voidopenPageNamed(java.lang.String pageName)Open an environment-specific page defined in the `serenity.conf` file under the `pages` section.voidopenUnchecked()Opens page without checking URL patterns.voidopenUnchecked(java.lang.String... parameterValues)Opens page without checking URL patterns.voidopenUnchecked(java.lang.String urlTemplateName, java.lang.String[] parameterValues)Opens page without checking URL patterns.voidopenUrl(java.lang.String absoluteUrl)voidresetImplicitTimeout()voidselectFromDropdown(org.openqa.selenium.WebElement dropdown, java.lang.String visibleLabel)voidselectMultipleItemsFromDropdown(org.openqa.selenium.WebElement dropdown, java.lang.String... selectedLabels)voidsetCheckbox(org.openqa.selenium.WebElement field, boolean value)voidsetDefaultBaseUrl(java.lang.String defaultBaseUrl)<T extends PageObject>
TsetDriver(org.openqa.selenium.WebDriver driver)protected voidsetDriver(org.openqa.selenium.WebDriver driver, long timeout)voidsetImplicitTimeout(int duration, java.time.temporal.TemporalUnit unit)voidsetPages(Pages pages)voidsetPageUrls(PageUrls pageUrls)Only for testing purposes.voidsetWaitForElementTimeout(long waitForTimeoutInMilliseconds)voidsetWaitForTimeout(long waitForTimeoutInMilliseconds)voidshouldBeDisplayed()Use the @At annotation (if present) to check that a page object is displaying the correct page.voidshouldBeVisible(org.openqa.selenium.By byCriteria)voidshouldBeVisible(org.openqa.selenium.WebElement field)Fail the test if this element is not displayed (rendered) on the screen.voidshouldContainAllText(java.lang.String... textValues)Check that all of the specified texts appears somewhere in the page.voidshouldContainText(java.lang.String textValue)Check that the specified text appears somewhere in the page.voidshouldContainTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated.voidshouldNotBeVisible(org.openqa.selenium.By byCriteria)voidshouldNotBeVisible(org.openqa.selenium.WebElement field)voidshouldNotContainTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated.<T extends PageObject>
TswitchToPage(java.lang.Class<T> pageObjectClass)Deprecated.java.lang.StringtextContentOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)java.lang.StringtextContentOf(WithByLocator locator)java.lang.StringtextContentOf(WithLocator locator)Return the text value of a given elementjava.lang.StringtextContentOf(org.openqa.selenium.By bySelector)java.lang.StringtextOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)java.lang.StringtextOf(WithByLocator locator)java.lang.StringtextOf(WithLocator locator)Return the text value of a given elementjava.lang.StringtextOf(org.openqa.selenium.By bySelector)java.util.List<org.openqa.selenium.WebElement>thenReturnElementList(org.openqa.selenium.By byListCriteria)java.lang.StringtoString()voidtypeInto(org.openqa.selenium.WebElement field, java.lang.String value)Clear a field and enter a value into it.java.lang.StringupdateUrlWithBaseUrlIfDefined(java.lang.String startingUrl)FileToUploadupload(java.lang.String filename)Upload a file via an HTML form.FileToUploaduploadData(byte[] data)FileToUploaduploadData(java.lang.String data)protected voidwaitABit(long timeInMilliseconds)WaitForBuilder<? extends PageObject>waitFor(int duration)PageObjectwaitFor(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)PageObjectwaitFor(java.lang.String message, org.openqa.selenium.support.ui.ExpectedCondition expectedCondition)WebElementFacadewaitFor(WebElementFacade webElement)PageObjectwaitFor(org.openqa.selenium.support.ui.ExpectedCondition expectedCondition)WebElementFacadewaitFor(org.openqa.selenium.WebElement webElement)PageObjectwaitForAbsenceOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)PageObjectwaitForAllTextToAppear(java.lang.String... expectedTexts)Waits for all of a number of text blocks to appear on the screen.voidwaitForAngularRequestsToFinish()PageObjectwaitForAnyRenderedElementOf(org.openqa.selenium.By... expectedElements)PageObjectwaitForAnyTextToAppear(java.lang.String... expectedText)Waits for any of a number of text blocks to appear anywhere on the screen.PageObjectwaitForAnyTextToAppear(org.openqa.selenium.WebElement element, java.lang.String... expectedText)SerenityFluentWaitwaitForCondition()WebElementFacadeWaitwaitForElement()PageObjectwaitForPresenceOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)PageObjectwaitForRenderedElements(org.openqa.selenium.By byElementCriteria)PageObjectwaitForRenderedElementsToBePresent(org.openqa.selenium.By byElementCriteria)PageObjectwaitForRenderedElementsToDisappear(org.openqa.selenium.By byElementCriteria)PageObjectwaitForTextToAppear(java.lang.String expectedText)Waits for a given text to appear anywhere on the page.PageObjectwaitForTextToAppear(java.lang.String expectedText, long timeout)Waits for a given text to appear anywhere on the page.PageObjectwaitForTextToAppear(org.openqa.selenium.WebElement element, java.lang.String expectedText)Waits for a given text to appear inside the element.PageObjectwaitForTextToDisappear(java.lang.String expectedText)PageObjectwaitForTextToDisappear(java.lang.String expectedText, long timeoutInMilliseconds)Waits for a given text to not be anywhere on the page.PageObjectwaitForTextToDisappear(org.openqa.selenium.WebElement element, java.lang.String expectedText)Waits for a given text to disappear from the element.longwaitForTimeoutInMilliseconds()PageObjectwaitForTitleToAppear(java.lang.String expectedTitle)PageObjectwaitForTitleToDisappear(java.lang.String expectedTitle)ThucydidesFluentWait<org.openqa.selenium.WebDriver>waitForWithRefresh()org.openqa.selenium.support.ui.WebDriverWaitwaitOnPage()org.openqa.selenium.interactions.ActionswithAction()<T extends PageObject>
TwithDriver(org.openqa.selenium.WebDriver driver)static java.lang.String[]withParameters(java.lang.String... parameterValues)RenderedPageObjectViewwithTimeoutOf(int timeout, java.time.temporal.TemporalUnit units)RenderedPageObjectViewwithTimeoutOf(int timeout, java.util.concurrent.TimeUnit units)Deprecated.TimeUnit has been replaced by TemporalUnit in Selenium.RenderedPageObjectViewwithTimeoutOf(java.time.Duration timeout)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
PageObject
protected PageObject() -
PageObject
protected PageObject(org.openqa.selenium.WebDriver driver, com.google.common.base.Predicate<? super PageObject> callback) -
PageObject
public PageObject(org.openqa.selenium.WebDriver driver, int ajaxTimeout) -
PageObject
public PageObject(org.openqa.selenium.WebDriver driver) -
PageObject
-
-
Method Details
-
setImplicitTimeout
public void setImplicitTimeout(int duration, java.time.temporal.TemporalUnit unit) -
resetImplicitTimeout
public void resetImplicitTimeout() -
setDriver
protected void setDriver(org.openqa.selenium.WebDriver driver, long timeout) -
setDriver
-
withDriver
-
getWaitForTimeout
public java.time.Duration getWaitForTimeout() -
getWaitForElementTimeout
@Deprecated public java.time.Duration getWaitForElementTimeout()Deprecated. -
getImplicitWaitTimeout
public java.time.Duration getImplicitWaitTimeout() -
setPages
-
switchToPage
Deprecated. -
upload
Upload a file via an HTML form. By default, this will look for a file on the file system, at the location provided. -
uploadData
- Throws:
java.io.IOException
-
uploadData
- Throws:
java.io.IOException
-
setPageUrls
Only for testing purposes. -
setWaitForTimeout
public void setWaitForTimeout(long waitForTimeoutInMilliseconds) -
setWaitForElementTimeout
public void setWaitForElementTimeout(long waitForTimeoutInMilliseconds) -
getRenderedView
-
getClock
-
getDriver
public org.openqa.selenium.WebDriver getDriver() -
getTitle
public java.lang.String getTitle() -
matchesAnyUrl
public boolean matchesAnyUrl() -
compatibleWithUrl
public final boolean compatibleWithUrl(java.lang.String currentUrl)Does this page object work for this URL? When matching a URL, we check with and without trailing slashes -
waitForRenderedElements
-
withTimeoutOf
@Deprecated public RenderedPageObjectView withTimeoutOf(int timeout, java.util.concurrent.TimeUnit units)Deprecated.TimeUnit has been replaced by TemporalUnit in Selenium. For more consistancy use a TemporalUnit parameter. -
withTimeoutOf
-
withTimeoutOf
-
waitFor
-
waitFor
-
waitFor
public PageObject waitFor(java.lang.String message, org.openqa.selenium.support.ui.ExpectedCondition expectedCondition) -
waitForRenderedElementsToBePresent
-
waitForPresenceOf
public PageObject waitForPresenceOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
waitForRenderedElementsToDisappear
-
waitForAbsenceOf
public PageObject waitForAbsenceOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
waitForTextToAppear
Waits for a given text to appear anywhere on the page. -
waitForTitleToAppear
-
waitOnPage
public org.openqa.selenium.support.ui.WebDriverWait waitOnPage() -
waitForTitleToDisappear
-
waitForTextToAppear
public PageObject waitForTextToAppear(org.openqa.selenium.WebElement element, java.lang.String expectedText)Waits for a given text to appear inside the element. -
waitForTextToDisappear
public PageObject waitForTextToDisappear(org.openqa.selenium.WebElement element, java.lang.String expectedText)Waits for a given text to disappear from the element. -
waitForTextToDisappear
-
waitForTextToDisappear
public PageObject waitForTextToDisappear(java.lang.String expectedText, long timeoutInMilliseconds)Waits for a given text to not be anywhere on the page. -
waitForTextToAppear
Waits for a given text to appear anywhere on the page. -
waitForAnyTextToAppear
Waits for any of a number of text blocks to appear anywhere on the screen. -
waitForAnyTextToAppear
public PageObject waitForAnyTextToAppear(org.openqa.selenium.WebElement element, java.lang.String... expectedText) -
waitForAllTextToAppear
Waits for all of a number of text blocks to appear on the screen. -
waitForAnyRenderedElementOf
-
waitABit
protected void waitABit(long timeInMilliseconds) -
waitFor
-
thenReturnElementList
public java.util.List<org.openqa.selenium.WebElement> thenReturnElementList(org.openqa.selenium.By byListCriteria) -
shouldContainText
public void shouldContainText(java.lang.String textValue)Check that the specified text appears somewhere in the page. -
shouldContainAllText
public void shouldContainAllText(java.lang.String... textValues)Check that all of the specified texts appears somewhere in the page. -
containsTextInElement
@Deprecated public boolean containsTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated.use element(webElement).containsText(textValue)Does the specified web element contain a given text value. Useful for dropdowns and so on. -
shouldContainTextInElement
@Deprecated public void shouldContainTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated. -
shouldNotContainTextInElement
@Deprecated public void shouldNotContainTextInElement(org.openqa.selenium.WebElement webElement, java.lang.String textValue)Deprecated. -
typeInto
public void typeInto(org.openqa.selenium.WebElement field, java.lang.String value)Clear a field and enter a value into it. -
enter
Clear a field and enter a value into it. This is a more fluent alternative to using the typeInto method. -
selectFromDropdown
public void selectFromDropdown(org.openqa.selenium.WebElement dropdown, java.lang.String visibleLabel) -
selectMultipleItemsFromDropdown
public void selectMultipleItemsFromDropdown(org.openqa.selenium.WebElement dropdown, java.lang.String... selectedLabels) -
getSelectedOptionLabelsFrom
public java.util.Set<java.lang.String> getSelectedOptionLabelsFrom(org.openqa.selenium.WebElement dropdown) -
getSelectedOptionValuesFrom
public java.util.Set<java.lang.String> getSelectedOptionValuesFrom(org.openqa.selenium.WebElement dropdown) -
getSelectedValueFrom
public java.lang.String getSelectedValueFrom(org.openqa.selenium.WebElement dropdown) -
getSelectedLabelFrom
public java.lang.String getSelectedLabelFrom(org.openqa.selenium.WebElement dropdown) -
setCheckbox
public void setCheckbox(org.openqa.selenium.WebElement field, boolean value) -
containsText
public boolean containsText(java.lang.String textValue) -
containsAllText
public boolean containsAllText(java.lang.String... textValues)Check that the specified text appears somewhere in the page. -
shouldBeVisible
public void shouldBeVisible(org.openqa.selenium.WebElement field)Fail the test if this element is not displayed (rendered) on the screen. -
shouldBeVisible
public void shouldBeVisible(org.openqa.selenium.By byCriteria) -
shouldNotBeVisible
public void shouldNotBeVisible(org.openqa.selenium.WebElement field) -
shouldNotBeVisible
public void shouldNotBeVisible(org.openqa.selenium.By byCriteria) -
waitForTimeoutInMilliseconds
public long waitForTimeoutInMilliseconds() -
implicitTimoutMilliseconds
public long implicitTimoutMilliseconds() -
updateUrlWithBaseUrlIfDefined
public java.lang.String updateUrlWithBaseUrlIfDefined(java.lang.String startingUrl) -
isRelative
protected boolean isRelative(java.lang.String startingUrl) -
open
public final void open(java.lang.String[] parameterValues)Open the webdriver browser using a paramaterized URL. Parameters are represented in the URL using {0}, {1}, etc. -
openUnchecked
public final void openUnchecked(java.lang.String... parameterValues)Opens page without checking URL patterns. Same as open(String...)) otherwise. -
open
-
open
public final void open(java.lang.String urlTemplateName, java.lang.String[] parameterValues) -
openUnchecked
public final void openUnchecked(java.lang.String urlTemplateName, java.lang.String[] parameterValues)Opens page without checking URL patterns. Same asopen(String, String[])otherwise. -
open
public final void open()Open the webdriver browser to the base URL, determined by the DefaultUrl annotation if present. If the DefaultUrl annotation is not present, the default base URL will be used. If the DefaultUrl annotation is present, a URL based on the current base url from the system-wide default url and the relative path provided in the DefaultUrl annotation will be used to determine the URL to open. For example, consider the following class:Suppose you are using a base URL of http://stage.acme.com. When you call open() for this class, it will open http://stage.acme.com/client/list. It will then invoke the waitUntilTitleAppears() method.@DefaultUrl("http://localhost:8080/client/list") public class ClientList extends PageObject { ... @WhenPageOpens public void waitUntilTitleAppears() {...} } -
openUnchecked
public final void openUnchecked()Opens page without checking URL patterns. Same asopen()otherwise. -
shouldBeDisplayed
public void shouldBeDisplayed()Use the @At annotation (if present) to check that a page object is displaying the correct page. Will throw an exception if the current URL does not match the expected one. -
openAt
public final void openAt(java.lang.String relativeUrl) -
openUrl
public final void openUrl(java.lang.String absoluteUrl) -
callWhenPageOpensMethods
public void callWhenPageOpensMethods()Override this method -
withParameters
public static java.lang.String[] withParameters(java.lang.String... parameterValues) -
openPageNamed
public void openPageNamed(java.lang.String pageName)Open an environment-specific page defined in the `serenity.conf` file under the `pages` section.- Parameters:
pageName-
-
clickOn
public void clickOn(org.openqa.selenium.WebElement webElement) -
isElementVisible
public java.lang.Boolean isElementVisible(org.openqa.selenium.By byCriteria)Returns true if at least one matching element is found on the page and is visible. -
setDefaultBaseUrl
public void setDefaultBaseUrl(java.lang.String defaultBaseUrl) -
hasFocus
public boolean hasFocus(org.openqa.selenium.WebElement webElement)Deprecated.Use element(webElement).hasFocus() insteadReturns true if the specified element has the focus. -
blurActiveElement
public void blurActiveElement() -
getJavascriptExecutorFacade
-
element
Provides a fluent API for querying web elements. -
$
-
$
-
$
-
$
public <T extends WebElementFacade> T $(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
$
-
textOf
Return the text value of a given element -
textOf
-
textOf
public java.lang.String textOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
textOf
public java.lang.String textOf(org.openqa.selenium.By bySelector) -
textContentOf
Return the text value of a given element -
textContentOf
-
textContentOf
public java.lang.String textContentOf(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
textContentOf
public java.lang.String textContentOf(org.openqa.selenium.By bySelector) -
$$
public ListOfWebElementFacades $$(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
$$
-
element
Provides a fluent API for querying web elements. -
find
-
find
-
find
-
find
-
findBy
-
findNested
-
find
-
findNested
-
findFirst
-
findFirst
-
findEach
-
findEach
-
findEach
-
findEach
FindEach will return a stream of WebElementFacades matching the described nested structure. Only the last selector will return a list; the initial selectors will be used to locate the list of elements.- Parameters:
bySelectors-- Returns:
-
findEach
-
findNestedElements
-
findEach
-
findAll
-
findAll
-
findAll
-
element
public <T extends WebElementFacade> T element(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)Provides a fluent API for querying web elements. -
findBy
public <T extends WebElementFacade> T findBy(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
findFirst
public java.util.Optional<WebElementFacade> findFirst(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
findAll
public ListOfWebElementFacades findAll(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
containsElements
public boolean containsElements(org.openqa.selenium.By bySelector) -
containsElements
public boolean containsElements(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
evaluateJavascript
public java.lang.Object evaluateJavascript(java.lang.String script) -
evaluateJavascript
public java.lang.Object evaluateJavascript(java.lang.String script, java.lang.Object... params) -
addJQuerySupport
public void addJQuerySupport() -
driverIsJQueryCompatible
protected boolean driverIsJQueryCompatible() -
inRadioButtonGroup
-
driverIsInstantiated
protected boolean driverIsInstantiated() -
waitForWithRefresh
-
waitForCondition
-
waitFor
-
waitFor
-
waitForElement
-
getAlert
public org.openqa.selenium.Alert getAlert() -
withAction
public org.openqa.selenium.interactions.Actions withAction() -
fluent
-
moveTo
public <T extends WebElementFacade> T moveTo(java.lang.String xpathOrCssSelector, java.lang.Object... arguments) -
moveTo
-
waitForAngularRequestsToFinish
public void waitForAngularRequestsToFinish() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-