public class WebElementFacadeImpl extends java.lang.Object implements WebElementFacade, WebElementFacade
Constructor and Description |
---|
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
long implicitTimeoutInMilliseconds) |
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
long implicitTimeoutInMilliseconds,
long waitForTimeoutInMilliseconds) |
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
org.openqa.selenium.WebElement webElement,
long implicitTimeoutInMilliseconds) |
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
org.openqa.selenium.WebElement webElement,
long implicitTimeoutInMilliseconds,
long waitForTimeoutInMilliseconds) |
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
org.openqa.selenium.WebElement webElement,
long implicitTimeoutInMilliseconds,
long waitForTimeoutInMilliseconds,
org.openqa.selenium.By bySelector) |
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
org.openqa.selenium.WebElement webElement,
org.openqa.selenium.WebElement resolvedELement,
org.openqa.selenium.By bySelector,
long timeoutInMilliseconds,
long waitForTimeoutInMilliseconds) |
Modifier and Type | Method and Description |
---|---|
WebElementFacade |
and()
Convenience method to chain method calls more fluently.
|
void |
clear() |
void |
click()
Wait for an element to be visible and enabled, and then click on it.
|
boolean |
containsElements(org.openqa.selenium.By bySelector) |
boolean |
containsElements(java.lang.String xpathOrCssSelector) |
boolean |
containsOnlyText(java.lang.String value)
Does this element exactly match given text?
|
boolean |
containsSelectOption(java.lang.String value)
Does this dropdown contain the specified value.
|
boolean |
containsText(java.lang.String value)
Does this element contain a given text?
|
boolean |
containsValue(java.lang.String value)
Does this element contain a given value attribute?
|
WebElementFacade |
deselectAll() |
WebElementFacade |
deselectByIndex(int indexValue) |
WebElementFacade |
deselectByValue(java.lang.String value) |
WebElementFacade |
deselectByVisibleText(java.lang.String label) |
WebElementState |
expect(java.lang.String errorMessage) |
WebElementFacade |
find(org.openqa.selenium.By bySelector) |
WebElementFacade |
findBy(org.openqa.selenium.By selector) |
<T extends WebElementFacade> |
findBy(java.lang.String xpathOrCssSelector) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElement(java.lang.String by,
java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByAccessibilityId(java.lang.String id) |
org.openqa.selenium.WebElement |
findElementByAndroidUIAutomator(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByIosUIAutomation(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
java.util.List |
findElements(java.lang.String by,
java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByAccessibilityId(java.lang.String id) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByAndroidUIAutomator(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByIosUIAutomation(java.lang.String using) |
WebElementFacade |
foundBy(java.lang.String foundBy) |
java.lang.String |
getAttribute(java.lang.String name) |
org.openqa.selenium.interactions.internal.Coordinates |
getCoordinates() |
java.lang.String |
getCssValue(java.lang.String propertyName) |
java.time.Duration |
getCurrentImplicitTimeout() |
java.lang.String |
getFoundBy() |
java.time.Duration |
getImplicitTimeout() |
long |
getImplicitTimeoutInMilliseconds() |
org.openqa.selenium.Point |
getLocation() |
org.openqa.selenium.support.pagefactory.ElementLocator |
getLocator() |
org.openqa.selenium.Rectangle |
getRect() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> target) |
java.lang.String |
getSelectedValue() |
java.lang.String |
getSelectedVisibleTextValue() |
java.util.List<java.lang.String> |
getSelectOptions() |
org.openqa.selenium.Dimension |
getSize() |
java.lang.String |
getTagName() |
java.lang.String |
getText() |
java.lang.String |
getTextValue() |
java.lang.String |
getValue() |
org.openqa.selenium.WebElement |
getWrappedElement() |
boolean |
hasClass(java.lang.String cssClassName) |
boolean |
hasFocus()
Does this element currently have the focus.
|
boolean |
isCurrentlyEnabled() |
boolean |
isCurrentlyVisible()
Is this web element present and visible on the screen
This method will not throw an exception if the element is not on the screen at all.
|
boolean |
isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an
element's "style" attribute.
|
boolean |
isEnabled() |
boolean |
isPresent()
Returns true if an element is present on the screen, whether visible or not.
|
boolean |
isSelected() |
boolean |
isVisible()
Is this web element present and visible on the screen
This method will not throw an exception if the element is not on the screen at all.
|
java.time.Duration |
resetTimeouts() |
WebElementFacade |
selectByIndex(int indexValue) |
WebElementFacade |
selectByValue(java.lang.String value) |
WebElementFacade |
selectByVisibleText(java.lang.String label) |
void |
sendKeys(java.lang.CharSequence... keysToSend) |
void |
setImplicitTimeout(java.time.Duration implicitTimeout) |
void |
setWindowFocus() |
void |
shouldBeCurrentlyVisible()
Checks whether a web element is visible.
|
void |
shouldBeEnabled() |
void |
shouldBePresent() |
void |
shouldBeVisible()
Checks whether a web element is visible.
|
void |
shouldContainElements(org.openqa.selenium.By bySelector) |
void |
shouldContainElements(java.lang.String xpathOrCssSelector) |
void |
shouldContainOnlyText(java.lang.String textValue)
Check that an element exactly matches a text value
|
void |
shouldContainSelectedOption(java.lang.String textValue) |
void |
shouldContainText(java.lang.String textValue)
Check that an element contains a text value
|
void |
shouldNotBeCurrentlyVisible()
Checks whether a web element is not visible straight away.
|
void |
shouldNotBeEnabled() |
void |
shouldNotBePresent() |
void |
shouldNotBeVisible()
Checks whether a web element is not visible.
|
void |
shouldNotContainText(java.lang.String textValue)
Check that an element does not contain a text value
|
void |
submit() |
WebElementFacade |
then()
Convenience method to chain method calls more fluently.
|
WebElementFacade |
then(org.openqa.selenium.By bySelector) |
WebElementFacade |
then(java.lang.String xpathOrCssSelector) |
java.util.List<WebElementFacade> |
thenFindAll(org.openqa.selenium.By selector) |
java.util.List<WebElementFacade> |
thenFindAll(java.lang.String xpathOrCssSelector) |
long |
timeoutInMilliseconds() |
java.lang.String |
toString() |
WebElementFacade |
type(java.lang.String value)
Type a value into a field, making sure that the field is empty first.
|
WebElementFacade |
typeAndEnter(java.lang.String value)
Type a value into a field and then press Enter, making sure that the field is empty first.
|
WebElementFacade |
typeAndTab(java.lang.String value)
Type a value into a field and then press TAB, making sure that the field is empty first.
|
org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> |
waitForCondition() |
WebElementFacade |
waitUntilClickable() |
WebElementFacade |
waitUntilDisabled() |
WebElementFacade |
waitUntilEnabled() |
WebElementFacade |
waitUntilNotVisible() |
WebElementFacade |
waitUntilPresent() |
WebElementFacade |
waitUntilVisible() |
WebElementFacade |
withTimeoutOf(int timeout,
java.util.concurrent.TimeUnit unit) |
static <T extends WebElementFacade> |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.By bySelector,
long timeoutInMilliseconds,
long waitForTimeoutInMilliseconds,
java.lang.String foundBy) |
static <T extends WebElementFacade> |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
long timeout) |
static <T extends WebElementFacade> |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
long timeoutInMilliseconds,
long waitForTimeoutInMilliseconds) |
static <T extends WebElementFacade> |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
long timeoutInMilliseconds,
long waitForTimeoutInMilliseconds,
java.lang.String foundBy) |
static <T extends WebElementFacade> |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement resolvedELement,
org.openqa.selenium.WebElement element,
org.openqa.selenium.By bySelector,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
long timeoutInMilliseconds,
long waitForTimeoutInMilliseconds,
java.lang.String foundBy) |
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds, org.openqa.selenium.By bySelector)
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds)
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, org.openqa.selenium.WebElement resolvedELement, org.openqa.selenium.By bySelector, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds)
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, long implicitTimeoutInMilliseconds)
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds)
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, java.lang.String foundBy)
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement resolvedELement, org.openqa.selenium.WebElement element, org.openqa.selenium.By bySelector, org.openqa.selenium.support.pagefactory.ElementLocator locator, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, java.lang.String foundBy)
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By bySelector, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, java.lang.String foundBy)
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeout)
public WebElementFacade then(java.lang.String xpathOrCssSelector)
then
in interface WebElementFacade
public <T extends WebElementFacade> T findBy(java.lang.String xpathOrCssSelector)
findBy
in interface WebElementFacade
public long timeoutInMilliseconds()
public java.util.List<WebElementFacade> thenFindAll(java.lang.String xpathOrCssSelector)
thenFindAll
in interface WebElementFacade
public WebElementFacade findBy(org.openqa.selenium.By selector)
findBy
in interface WebElementFacade
public WebElementFacade find(org.openqa.selenium.By bySelector)
find
in interface WebElementFacade
public WebElementFacade then(org.openqa.selenium.By bySelector)
then
in interface WebElementFacade
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface WebElementFacade
getAttribute
in interface org.openqa.selenium.WebElement
public java.util.List<WebElementFacade> thenFindAll(org.openqa.selenium.By selector)
thenFindAll
in interface WebElementFacade
public org.openqa.selenium.WebElement findElementByAccessibilityId(java.lang.String id)
findElementByAccessibilityId
in interface io.appium.java_client.FindsByAccessibilityId
public java.util.List<org.openqa.selenium.WebElement> findElementsByAccessibilityId(java.lang.String id)
findElementsByAccessibilityId
in interface io.appium.java_client.FindsByAccessibilityId
public org.openqa.selenium.WebElement findElementByAndroidUIAutomator(java.lang.String using)
findElementByAndroidUIAutomator
in interface io.appium.java_client.FindsByAndroidUIAutomator
public java.util.List<org.openqa.selenium.WebElement> findElementsByAndroidUIAutomator(java.lang.String using)
findElementsByAndroidUIAutomator
in interface io.appium.java_client.FindsByAndroidUIAutomator
public org.openqa.selenium.WebElement findElementByIosUIAutomation(java.lang.String using)
findElementByIosUIAutomation
in interface io.appium.java_client.FindsByIosUIAutomation
public java.util.List<org.openqa.selenium.WebElement> findElementsByIosUIAutomation(java.lang.String using)
findElementsByIosUIAutomation
in interface io.appium.java_client.FindsByIosUIAutomation
public long getImplicitTimeoutInMilliseconds()
getImplicitTimeoutInMilliseconds
in interface WebElementFacade
public java.time.Duration getImplicitTimeout()
public WebElementFacade withTimeoutOf(int timeout, java.util.concurrent.TimeUnit unit)
withTimeoutOf
in interface WebElementFacade
public boolean isVisible()
isVisible
in interface WebElementState
public WebElementFacade and()
and
in interface WebElementFacade
public WebElementFacade then()
then
in interface WebElementFacade
public boolean isCurrentlyVisible()
isCurrentlyVisible
in interface WebElementState
public boolean isCurrentlyEnabled()
isCurrentlyEnabled
in interface WebElementState
public void shouldBeVisible()
shouldBeVisible
in interface WebElementState
public void shouldBeCurrentlyVisible()
shouldBeCurrentlyVisible
in interface WebElementState
public void shouldNotBeVisible()
shouldNotBeVisible
in interface WebElementState
public void shouldNotBeCurrentlyVisible()
shouldNotBeCurrentlyVisible
in interface WebElementState
public boolean hasFocus()
hasFocus
in interface WebElementState
public boolean containsText(java.lang.String value)
containsText
in interface WebElementState
public boolean containsValue(java.lang.String value)
WebElementState
containsValue
in interface WebElementState
public boolean containsOnlyText(java.lang.String value)
containsOnlyText
in interface WebElementState
public boolean containsSelectOption(java.lang.String value)
containsSelectOption
in interface WebElementState
public java.util.List<java.lang.String> getSelectOptions()
getSelectOptions
in interface WebElementFacade
getSelectOptions
in interface WebElementState
public org.openqa.selenium.support.pagefactory.ElementLocator getLocator()
public void setImplicitTimeout(java.time.Duration implicitTimeout)
setImplicitTimeout
in interface ConfigurableTimeouts
public java.time.Duration getCurrentImplicitTimeout()
getCurrentImplicitTimeout
in interface ConfigurableTimeouts
public java.time.Duration resetTimeouts()
resetTimeouts
in interface ConfigurableTimeouts
public java.lang.String getFoundBy()
public void shouldContainText(java.lang.String textValue)
shouldContainText
in interface WebElementState
textValue
- public void shouldContainOnlyText(java.lang.String textValue)
shouldContainOnlyText
in interface WebElementState
textValue
- public void shouldContainSelectedOption(java.lang.String textValue)
shouldContainSelectedOption
in interface WebElementState
public void shouldNotContainText(java.lang.String textValue)
shouldNotContainText
in interface WebElementState
textValue
- public void shouldBeEnabled()
shouldBeEnabled
in interface WebElementState
public boolean isEnabled()
isEnabled
in interface WebElementState
isEnabled
in interface org.openqa.selenium.WebElement
public void shouldNotBeEnabled()
shouldNotBeEnabled
in interface WebElementState
public WebElementFacade type(java.lang.String value)
type
in interface WebElementFacade
value
- public WebElementFacade typeAndEnter(java.lang.String value)
typeAndEnter
in interface WebElementFacade
value
- public WebElementFacade typeAndTab(java.lang.String value)
typeAndTab
in interface WebElementFacade
value
- public void setWindowFocus()
setWindowFocus
in interface WebElementFacade
public WebElementFacade deselectAll()
deselectAll
in interface WebElementFacade
public WebElementFacade deselectByIndex(int indexValue)
deselectByIndex
in interface WebElementFacade
public WebElementFacade deselectByVisibleText(java.lang.String label)
deselectByVisibleText
in interface WebElementFacade
public WebElementFacade deselectByValue(java.lang.String value)
deselectByValue
in interface WebElementFacade
public WebElementFacade selectByVisibleText(java.lang.String label)
selectByVisibleText
in interface WebElementFacade
public java.lang.String getSelectedVisibleTextValue()
getSelectedVisibleTextValue
in interface WebElementState
public WebElementFacade selectByValue(java.lang.String value)
selectByValue
in interface WebElementFacade
public java.lang.String getSelectedValue()
getSelectedValue
in interface WebElementState
public WebElementFacade selectByIndex(int indexValue)
selectByIndex
in interface WebElementFacade
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target) throws org.openqa.selenium.WebDriverException
getScreenshotAs
in interface org.openqa.selenium.TakesScreenshot
org.openqa.selenium.WebDriverException
public boolean isPresent()
isPresent
in interface WebElementState
public void shouldBePresent()
shouldBePresent
in interface WebElementState
public void shouldNotBePresent()
shouldNotBePresent
in interface WebElementState
public WebElementFacade waitUntilVisible()
waitUntilVisible
in interface WebElementFacade
public WebElementFacade waitUntilPresent()
waitUntilPresent
in interface WebElementFacade
public org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> waitForCondition()
waitForCondition
in interface WebElementFacade
public WebElementFacade waitUntilNotVisible()
waitUntilNotVisible
in interface WebElementFacade
public java.lang.String getValue()
getValue
in interface WebElementFacade
public boolean isSelected()
isSelected
in interface WebElementState
isSelected
in interface org.openqa.selenium.WebElement
public java.lang.String getText()
getText
in interface WebElementFacade
getText
in interface org.openqa.selenium.WebElement
public WebElementFacade waitUntilEnabled()
waitUntilEnabled
in interface WebElementFacade
public WebElementFacade waitUntilClickable()
waitUntilClickable
in interface WebElementFacade
public WebElementFacade waitUntilDisabled()
waitUntilDisabled
in interface WebElementFacade
public java.lang.String getTextValue()
getTextValue
in interface WebElementState
public WebElementState expect(java.lang.String errorMessage)
expect
in interface WebElementState
public void click()
click
in interface WebElementFacade
click
in interface org.openqa.selenium.WebElement
public void clear()
clear
in interface WebElementFacade
clear
in interface org.openqa.selenium.WebElement
public java.lang.String toString()
toString
in interface WebElementFacade
toString
in class java.lang.Object
public void submit()
submit
in interface org.openqa.selenium.WebElement
public void sendKeys(java.lang.CharSequence... keysToSend)
sendKeys
in interface org.openqa.selenium.WebElement
public java.lang.String getTagName()
getTagName
in interface org.openqa.selenium.WebElement
public java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements
in interface org.openqa.selenium.SearchContext
findElements
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement
in interface org.openqa.selenium.SearchContext
findElement
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.WebElement findElement(java.lang.String by, java.lang.String using)
findElement
in interface io.appium.java_client.FindsByFluentSelector
public java.util.List findElements(java.lang.String by, java.lang.String using)
findElements
in interface io.appium.java_client.FindsByFluentSelector
public boolean isDisplayed()
isDisplayed
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.Point getLocation()
getLocation
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.Dimension getSize()
getSize
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.Rectangle getRect()
getRect
in interface org.openqa.selenium.WebElement
public java.lang.String getCssValue(java.lang.String propertyName)
getCssValue
in interface org.openqa.selenium.WebElement
public org.openqa.selenium.WebElement getWrappedElement()
getWrappedElement
in interface org.openqa.selenium.WrapsElement
public org.openqa.selenium.interactions.internal.Coordinates getCoordinates()
getCoordinates
in interface org.openqa.selenium.interactions.Locatable
public boolean containsElements(org.openqa.selenium.By bySelector)
containsElements
in interface WebElementFacade
public boolean containsElements(java.lang.String xpathOrCssSelector)
containsElements
in interface WebElementFacade
public void shouldContainElements(org.openqa.selenium.By bySelector)
shouldContainElements
in interface WebElementFacade
public void shouldContainElements(java.lang.String xpathOrCssSelector)
shouldContainElements
in interface WebElementFacade
public boolean hasClass(java.lang.String cssClassName)
hasClass
in interface WebElementFacade
public WebElementFacade foundBy(java.lang.String foundBy)