Package net.serenitybdd.core.pages
Class WebElementFacadeImpl
- java.lang.Object
-
- net.serenitybdd.core.pages.WebElementFacadeImpl
-
- All Implemented Interfaces:
io.appium.java_client.FindsByAccessibilityId
,io.appium.java_client.FindsByAndroidUIAutomator
,io.appium.java_client.FindsByFluentSelector
,WebElementFacade
,WebElementState
,WebElementFacade
,WebElementState
,ConfigurableTimeouts
,org.openqa.selenium.interactions.Locatable
,org.openqa.selenium.SearchContext
,org.openqa.selenium.TakesScreenshot
,org.openqa.selenium.WebElement
,org.openqa.selenium.WrapsElement
- Direct Known Subclasses:
WebElementFacadeImpl
,WidgetObjectImpl
,WrappedWebElementFacadeImpl
public class WebElementFacadeImpl extends Object implements WebElementFacade, WebElementFacade
A proxy class for a web element, providing some more methods.
-
-
Constructor Summary
Constructors Constructor 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)
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds, org.openqa.selenium.By bySelector)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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.void
click(ClickStrategy clickStrategy)
Click on an element, with or without waiting for it to be visible and enabledboolean
containsElements(String xpathOrCssSelector)
boolean
containsElements(org.openqa.selenium.By bySelector)
boolean
containsOnlyText(String value)
Does this element exactly match given text?boolean
containsSelectOption(String value)
Does this dropdown contain the specified value.boolean
containsText(String value)
Does this element contain a given text?boolean
containsValue(String value)
Does this element contain a given value attribute?FluentDropdownDeselect
deselect()
WebElementFacade
deselectAll()
Deprecated.WebElementFacade
deselectByIndex(int indexValue)
Deprecated.WebElementFacade
deselectByValue(String value)
Deprecated.WebElementFacade
deselectByVisibleText(String label)
Deprecated.protected boolean
driverIsDisabled()
WebElementState
expect(String errorMessage)
protected WebElementState
expectingErrorMessage(String errorMessage)
WebElementFacade
find(org.openqa.selenium.By bySelector)
<T extends WebElementFacade>
TfindBy(String xpathOrCssSelector)
<T extends WebElementFacade>
TfindBy(String xpathOrCssSelector, Object... arguments)
WebElementFacade
findBy(org.openqa.selenium.By selector)
org.openqa.selenium.WebElement
findElement(String by, String using)
org.openqa.selenium.WebElement
findElement(org.openqa.selenium.By by)
org.openqa.selenium.WebElement
findElementByAccessibilityId(String id)
org.openqa.selenium.WebElement
findElementByAndroidUIAutomator(String using)
List
findElements(String by, String using)
List<org.openqa.selenium.WebElement>
findElements(org.openqa.selenium.By by)
List<org.openqa.selenium.WebElement>
findElementsByAccessibilityId(String id)
List<org.openqa.selenium.WebElement>
findElementsByAndroidUIAutomator(String using)
WebElementFacade
foundBy(String foundBy)
String
getAttribute(String name)
protected InternalSystemClock
getClock()
org.openqa.selenium.interactions.Coordinates
getCoordinates()
String
getCssValue(String propertyName)
Duration
getCurrentImplicitTimeout()
org.openqa.selenium.WebElement
getElement()
protected String
getErrorMessage(String defaultErrorMessage)
String
getFirstSelectedOptionValue()
String
getFirstSelectedOptionVisibleText()
String
getFoundBy()
Duration
getImplicitTimeout()
long
getImplicitTimeoutInMilliseconds()
protected JavascriptExecutorFacade
getJavascriptExecutorFacade()
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)
String
getSelectedValue()
List<String>
getSelectedValues()
List<String>
getSelectedVisibleTexts()
String
getSelectedVisibleTextValue()
List<String>
getSelectOptions()
org.openqa.selenium.Dimension
getSize()
String
getTagName()
String
getText()
String
getTextContent()
String
getTextValue()
String
getValue()
org.openqa.selenium.WebElement
getWrappedElement()
boolean
hasClass(String cssClassName)
boolean
hasFocus()
Does this element currently have the focus.boolean
isClickable()
Check to see if the element is clickableboolean
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
isDisabled()
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.protected void
notifyScreenChange()
Duration
resetTimeouts()
FluentDropdownSelect
select()
WebElementFacade
selectByIndex(int indexValue)
Deprecated.WebElementFacade
selectByValue(String value)
Deprecated.WebElementFacade
selectByVisibleText(String label)
Deprecated.void
sendKeys(CharSequence... keysToSend)
void
setImplicitTimeout(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(String xpathOrCssSelector)
void
shouldContainElements(org.openqa.selenium.By bySelector)
void
shouldContainOnlyText(String textValue)
Check that an element exactly matches a text valuevoid
shouldContainSelectedOption(String textValue)
void
shouldContainText(String textValue)
Check that an element contains a text valuevoid
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(String textValue)
Check that an element does not contain a text valuevoid
submit()
WebElementFacade
then()
Convenience method to chain method calls more fluently.WebElementFacade
then(String xpathOrCssSelector)
WebElementFacade
then(String xpathOrCssSelector, Object... arguments)
WebElementFacade
then(org.openqa.selenium.By bySelector)
WebElementFacade
thenFind(String xpathOrCssSelector)
WebElementFacade
thenFind(String xpathOrCssSelector, Object... arguments)
ListOfWebElementFacades
thenFindAll(String xpathOrCssSelector)
ListOfWebElementFacades
thenFindAll(String xpathOrCssSelector, Object... arguments)
ListOfWebElementFacades
thenFindAll(org.openqa.selenium.By selector)
long
timeoutInMilliseconds()
String
toString()
WebElementFacade
type(CharSequence... keysToSend)
Type a value into a field, making sure that the field is empty first.WebElementFacade
typeAndEnter(String value)
Type a value into a field and then press Enter, making sure that the field is empty first.WebElementFacade
typeAndTab(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()
protected void
waitUntilElementAvailable()
protected void
waitUntilElementPresent()
WebElementFacade
waitUntilEnabled()
WebElementFacade
waitUntilNotVisible()
WebElementFacade
waitUntilPresent()
WebElementFacade
waitUntilVisible()
WebElementFacade
withTimeoutOf(int timeout, TemporalUnit unit)
WebElementFacade
withTimeoutOf(int timeout, TimeUnit unit)
WebElementFacade
withTimeoutOf(Duration duration)
static <T extends WebElementFacade>
TwrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By bySelector, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, String foundBy)
static <T extends WebElementFacade>
TwrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeout)
static <T extends WebElementFacade>
TwrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds)
static <T extends WebElementFacade>
TwrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, String foundBy)
static <T extends WebElementFacade>
TwrapWebElement(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, String foundBy)
-
-
-
Constructor Detail
-
WebElementFacadeImpl
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)
-
WebElementFacadeImpl
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds, org.openqa.selenium.By bySelector)
-
WebElementFacadeImpl
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
-
WebElementFacadeImpl
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, org.openqa.selenium.WebElement webElement, long implicitTimeoutInMilliseconds)
-
WebElementFacadeImpl
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)
-
WebElementFacadeImpl
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, long implicitTimeoutInMilliseconds)
-
WebElementFacadeImpl
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver, org.openqa.selenium.support.pagefactory.ElementLocator locator, long implicitTimeoutInMilliseconds, long waitForTimeoutInMilliseconds)
-
-
Method Detail
-
wrapWebElement
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds)
-
wrapWebElement
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, String foundBy)
-
wrapWebElement
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, String foundBy)
-
wrapWebElement
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By bySelector, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, String foundBy)
-
wrapWebElement
public static <T extends WebElementFacade> T wrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, long timeout)
-
getElement
public org.openqa.selenium.WebElement getElement()
- Specified by:
getElement
in interfaceWebElementFacade
-
getJavascriptExecutorFacade
protected JavascriptExecutorFacade getJavascriptExecutorFacade()
-
getClock
protected InternalSystemClock getClock()
-
then
public WebElementFacade then(String xpathOrCssSelector, Object... arguments)
- Specified by:
then
in interfaceWebElementFacade
-
thenFind
public WebElementFacade thenFind(String xpathOrCssSelector, Object... arguments)
- Specified by:
thenFind
in interfaceWebElementFacade
-
thenFind
public WebElementFacade thenFind(String xpathOrCssSelector)
- Specified by:
thenFind
in interfaceWebElementFacade
-
then
public WebElementFacade then(String xpathOrCssSelector)
- Specified by:
then
in interfaceWebElementFacade
-
findBy
public <T extends WebElementFacade> T findBy(String xpathOrCssSelector)
- Specified by:
findBy
in interfaceWebElementFacade
-
findBy
public <T extends WebElementFacade> T findBy(String xpathOrCssSelector, Object... arguments)
- Specified by:
findBy
in interfaceWebElementFacade
-
timeoutInMilliseconds
public long timeoutInMilliseconds()
-
thenFindAll
public ListOfWebElementFacades thenFindAll(String xpathOrCssSelector)
- Specified by:
thenFindAll
in interfaceWebElementFacade
-
thenFindAll
public ListOfWebElementFacades thenFindAll(String xpathOrCssSelector, Object... arguments)
- Specified by:
thenFindAll
in interfaceWebElementFacade
-
findBy
public WebElementFacade findBy(org.openqa.selenium.By selector)
- Specified by:
findBy
in interfaceWebElementFacade
-
find
public WebElementFacade find(org.openqa.selenium.By bySelector)
- Specified by:
find
in interfaceWebElementFacade
-
then
public WebElementFacade then(org.openqa.selenium.By bySelector)
- Specified by:
then
in interfaceWebElementFacade
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interfaceorg.openqa.selenium.WebElement
- Specified by:
getAttribute
in interfaceWebElementFacade
-
thenFindAll
public ListOfWebElementFacades thenFindAll(org.openqa.selenium.By selector)
- Specified by:
thenFindAll
in interfaceWebElementFacade
-
findElementByAccessibilityId
public org.openqa.selenium.WebElement findElementByAccessibilityId(String id)
- Specified by:
findElementByAccessibilityId
in interfaceio.appium.java_client.FindsByAccessibilityId
-
findElementsByAccessibilityId
public List<org.openqa.selenium.WebElement> findElementsByAccessibilityId(String id)
- Specified by:
findElementsByAccessibilityId
in interfaceio.appium.java_client.FindsByAccessibilityId
-
findElementByAndroidUIAutomator
public org.openqa.selenium.WebElement findElementByAndroidUIAutomator(String using)
- Specified by:
findElementByAndroidUIAutomator
in interfaceio.appium.java_client.FindsByAndroidUIAutomator
-
findElementsByAndroidUIAutomator
public List<org.openqa.selenium.WebElement> findElementsByAndroidUIAutomator(String using)
- Specified by:
findElementsByAndroidUIAutomator
in interfaceio.appium.java_client.FindsByAndroidUIAutomator
-
getImplicitTimeoutInMilliseconds
public long getImplicitTimeoutInMilliseconds()
- Specified by:
getImplicitTimeoutInMilliseconds
in interfaceWebElementFacade
-
getImplicitTimeout
public Duration getImplicitTimeout()
-
withTimeoutOf
public WebElementFacade withTimeoutOf(int timeout, TimeUnit unit)
- Specified by:
withTimeoutOf
in interfaceWebElementFacade
-
withTimeoutOf
public WebElementFacade withTimeoutOf(int timeout, TemporalUnit unit)
- Specified by:
withTimeoutOf
in interfaceWebElementFacade
-
withTimeoutOf
public WebElementFacade withTimeoutOf(Duration duration)
- Specified by:
withTimeoutOf
in interfaceWebElementFacade
-
isVisible
public 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. If the element is not visible, the method will wait a bit to see if it appears later on.- Specified by:
isVisible
in interfaceWebElementState
-
and
public WebElementFacade and()
Convenience method to chain method calls more fluently.- Specified by:
and
in interfaceWebElementFacade
-
then
public WebElementFacade then()
Convenience method to chain method calls more fluently.- Specified by:
then
in interfaceWebElementFacade
-
isCurrentlyVisible
public 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. The method will fail immediately if the element is not visible on the screen. There is a little black magic going on here - the web element class will detect if it is being called by a method called "isCurrently*" and, if so, fail immediately without waiting as it would normally do.- Specified by:
isCurrentlyVisible
in interfaceWebElementState
-
isCurrentlyEnabled
public boolean isCurrentlyEnabled()
- Specified by:
isCurrentlyEnabled
in interfaceWebElementState
-
shouldBeVisible
public void shouldBeVisible()
Checks whether a web element is visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldBeVisible
in interfaceWebElementState
-
shouldBeCurrentlyVisible
public void shouldBeCurrentlyVisible()
Checks whether a web element is visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldBeCurrentlyVisible
in interfaceWebElementState
-
shouldNotBeVisible
public void shouldNotBeVisible()
Checks whether a web element is not visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldNotBeVisible
in interfaceWebElementState
-
shouldNotBeCurrentlyVisible
public void shouldNotBeCurrentlyVisible()
Checks whether a web element is not visible straight away. Throws an AssertionError if the element is not rendered.- Specified by:
shouldNotBeCurrentlyVisible
in interfaceWebElementState
-
hasFocus
public boolean hasFocus()
Does this element currently have the focus.- Specified by:
hasFocus
in interfaceWebElementState
-
containsText
public boolean containsText(String value)
Does this element contain a given text?- Specified by:
containsText
in interfaceWebElementState
-
containsValue
public boolean containsValue(String value)
Description copied from interface:WebElementState
Does this element contain a given value attribute?- Specified by:
containsValue
in interfaceWebElementState
-
containsOnlyText
public boolean containsOnlyText(String value)
Does this element exactly match given text?- Specified by:
containsOnlyText
in interfaceWebElementState
-
containsSelectOption
public boolean containsSelectOption(String value)
Does this dropdown contain the specified value.- Specified by:
containsSelectOption
in interfaceWebElementState
-
getSelectOptions
public List<String> getSelectOptions()
- Specified by:
getSelectOptions
in interfaceWebElementFacade
- Specified by:
getSelectOptions
in interfaceWebElementState
-
getLocator
public org.openqa.selenium.support.pagefactory.ElementLocator getLocator()
-
setImplicitTimeout
public void setImplicitTimeout(Duration implicitTimeout)
- Specified by:
setImplicitTimeout
in interfaceConfigurableTimeouts
-
getCurrentImplicitTimeout
public Duration getCurrentImplicitTimeout()
- Specified by:
getCurrentImplicitTimeout
in interfaceConfigurableTimeouts
-
resetTimeouts
public Duration resetTimeouts()
- Specified by:
resetTimeouts
in interfaceConfigurableTimeouts
-
getFoundBy
public String getFoundBy()
-
shouldContainText
public void shouldContainText(String textValue)
Check that an element contains a text value- Specified by:
shouldContainText
in interfaceWebElementState
- Parameters:
textValue
-
-
shouldContainOnlyText
public void shouldContainOnlyText(String textValue)
Check that an element exactly matches a text value- Specified by:
shouldContainOnlyText
in interfaceWebElementState
- Parameters:
textValue
-
-
shouldContainSelectedOption
public void shouldContainSelectedOption(String textValue)
- Specified by:
shouldContainSelectedOption
in interfaceWebElementState
-
shouldNotContainText
public void shouldNotContainText(String textValue)
Check that an element does not contain a text value- Specified by:
shouldNotContainText
in interfaceWebElementState
- Parameters:
textValue
-
-
shouldBeEnabled
public void shouldBeEnabled()
- Specified by:
shouldBeEnabled
in interfaceWebElementState
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceorg.openqa.selenium.WebElement
- Specified by:
isEnabled
in interfaceWebElementState
-
shouldNotBeEnabled
public void shouldNotBeEnabled()
- Specified by:
shouldNotBeEnabled
in interfaceWebElementState
-
isClickable
public boolean isClickable()
Check to see if the element is clickable- Specified by:
isClickable
in interfaceWebElementState
-
type
public WebElementFacade type(CharSequence... keysToSend)
Type a value into a field, making sure that the field is empty first.- Specified by:
type
in interfaceWebElementFacade
- Parameters:
keysToSend
-
-
typeAndEnter
public WebElementFacade typeAndEnter(String value)
Type a value into a field and then press Enter, making sure that the field is empty first.- Specified by:
typeAndEnter
in interfaceWebElementFacade
- Parameters:
value
-
-
typeAndTab
public WebElementFacade typeAndTab(String value)
Type a value into a field and then press TAB, making sure that the field is empty first. This currently is not supported by all browsers, notably Firefox.- Specified by:
typeAndTab
in interfaceWebElementFacade
- Parameters:
value
-
-
setWindowFocus
public void setWindowFocus()
- Specified by:
setWindowFocus
in interfaceWebElementFacade
-
select
public FluentDropdownSelect select()
- Specified by:
select
in interfaceWebElementFacade
-
deselect
public FluentDropdownDeselect deselect()
- Specified by:
deselect
in interfaceWebElementFacade
-
deselectAll
@Deprecated public WebElementFacade deselectAll()
Deprecated.- Specified by:
deselectAll
in interfaceWebElementFacade
-
deselectByIndex
@Deprecated public WebElementFacade deselectByIndex(int indexValue)
Deprecated.- Specified by:
deselectByIndex
in interfaceWebElementFacade
-
deselectByVisibleText
@Deprecated public WebElementFacade deselectByVisibleText(String label)
Deprecated.- Specified by:
deselectByVisibleText
in interfaceWebElementFacade
-
deselectByValue
@Deprecated public WebElementFacade deselectByValue(String value)
Deprecated.- Specified by:
deselectByValue
in interfaceWebElementFacade
-
selectByVisibleText
@Deprecated public WebElementFacade selectByVisibleText(String label)
Deprecated.- Specified by:
selectByVisibleText
in interfaceWebElementFacade
-
getSelectedVisibleTextValue
public String getSelectedVisibleTextValue()
- Specified by:
getSelectedVisibleTextValue
in interfaceWebElementState
-
getFirstSelectedOptionVisibleText
public String getFirstSelectedOptionVisibleText()
- Specified by:
getFirstSelectedOptionVisibleText
in interfaceWebElementFacade
-
getSelectedVisibleTexts
public List<String> getSelectedVisibleTexts()
- Specified by:
getSelectedVisibleTexts
in interfaceWebElementFacade
-
getFirstSelectedOptionValue
public String getFirstSelectedOptionValue()
- Specified by:
getFirstSelectedOptionValue
in interfaceWebElementFacade
-
getSelectedValues
public List<String> getSelectedValues()
- Specified by:
getSelectedValues
in interfaceWebElementFacade
-
selectByValue
@Deprecated public WebElementFacade selectByValue(String value)
Deprecated.- Specified by:
selectByValue
in interfaceWebElementFacade
-
getSelectedValue
public String getSelectedValue()
- Specified by:
getSelectedValue
in interfaceWebElementState
-
selectByIndex
@Deprecated public WebElementFacade selectByIndex(int indexValue)
Deprecated.- Specified by:
selectByIndex
in interfaceWebElementFacade
-
getScreenshotAs
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target) throws org.openqa.selenium.WebDriverException
- Specified by:
getScreenshotAs
in interfaceorg.openqa.selenium.TakesScreenshot
- Throws:
org.openqa.selenium.WebDriverException
-
waitUntilElementAvailable
protected void waitUntilElementAvailable()
-
waitUntilElementPresent
protected void waitUntilElementPresent()
-
driverIsDisabled
protected boolean driverIsDisabled()
-
isPresent
public boolean isPresent()
Returns true if an element is present on the screen, whether visible or not.- Specified by:
isPresent
in interfaceWebElementState
-
shouldBePresent
public void shouldBePresent()
- Specified by:
shouldBePresent
in interfaceWebElementState
-
shouldNotBePresent
public void shouldNotBePresent()
- Specified by:
shouldNotBePresent
in interfaceWebElementState
-
waitUntilVisible
public WebElementFacade waitUntilVisible()
- Specified by:
waitUntilVisible
in interfaceWebElementFacade
-
waitUntilPresent
public WebElementFacade waitUntilPresent()
- Specified by:
waitUntilPresent
in interfaceWebElementFacade
-
waitForCondition
public org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> waitForCondition()
- Specified by:
waitForCondition
in interfaceWebElementFacade
-
waitUntilNotVisible
public WebElementFacade waitUntilNotVisible()
- Specified by:
waitUntilNotVisible
in interfaceWebElementFacade
-
getValue
public String getValue()
- Specified by:
getValue
in interfaceWebElementFacade
- Specified by:
getValue
in interfaceWebElementState
-
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interfaceorg.openqa.selenium.WebElement
- Specified by:
isSelected
in interfaceWebElementState
-
getText
public String getText()
- Specified by:
getText
in interfaceorg.openqa.selenium.WebElement
- Specified by:
getText
in interfaceWebElementFacade
- Specified by:
getText
in interfaceWebElementState
-
getTextContent
public String getTextContent()
- Specified by:
getTextContent
in interfaceWebElementFacade
-
isDisabled
public boolean isDisabled()
- Specified by:
isDisabled
in interfaceWebElementFacade
- Specified by:
isDisabled
in interfaceWebElementState
-
waitUntilEnabled
public WebElementFacade waitUntilEnabled()
- Specified by:
waitUntilEnabled
in interfaceWebElementFacade
-
waitUntilClickable
public WebElementFacade waitUntilClickable()
- Specified by:
waitUntilClickable
in interfaceWebElementFacade
-
waitUntilDisabled
public WebElementFacade waitUntilDisabled()
- Specified by:
waitUntilDisabled
in interfaceWebElementFacade
-
getTextValue
public String getTextValue()
- Specified by:
getTextValue
in interfaceWebElementState
-
expect
public WebElementState expect(String errorMessage)
- Specified by:
expect
in interfaceWebElementState
-
expectingErrorMessage
protected WebElementState expectingErrorMessage(String errorMessage)
-
click
public void click(ClickStrategy clickStrategy)
Click on an element, with or without waiting for it to be visible and enabled- Specified by:
click
in interfaceWebElementFacade
-
click
public void click()
Wait for an element to be visible and enabled, and then click on it.- Specified by:
click
in interfaceorg.openqa.selenium.WebElement
- Specified by:
click
in interfaceWebElementFacade
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.openqa.selenium.WebElement
- Specified by:
clear
in interfaceWebElementFacade
-
notifyScreenChange
protected void notifyScreenChange()
-
toString
public String toString()
- Specified by:
toString
in interfaceWebElementFacade
- Overrides:
toString
in classObject
-
submit
public void submit()
- Specified by:
submit
in interfaceorg.openqa.selenium.WebElement
-
sendKeys
public void sendKeys(CharSequence... keysToSend)
- Specified by:
sendKeys
in interfaceorg.openqa.selenium.WebElement
-
getTagName
public String getTagName()
- Specified by:
getTagName
in interfaceorg.openqa.selenium.WebElement
-
findElements
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
- Specified by:
findElements
in interfaceorg.openqa.selenium.SearchContext
- Specified by:
findElements
in interfaceorg.openqa.selenium.WebElement
-
findElement
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
- Specified by:
findElement
in interfaceorg.openqa.selenium.SearchContext
- Specified by:
findElement
in interfaceorg.openqa.selenium.WebElement
-
findElement
public org.openqa.selenium.WebElement findElement(String by, String using)
- Specified by:
findElement
in interfaceio.appium.java_client.FindsByFluentSelector
-
findElements
public List findElements(String by, String using)
- Specified by:
findElements
in interfaceio.appium.java_client.FindsByFluentSelector
-
isDisplayed
public boolean isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute. This method respects the semantics of the Selenium isDisplayed() method, and will throw an exception if the element is not found. To simply return true or false depending on whether an element is- Specified by:
isDisplayed
in interfaceorg.openqa.selenium.WebElement
- Returns:
- Whether or not the element is displayed
-
getLocation
public org.openqa.selenium.Point getLocation()
- Specified by:
getLocation
in interfaceorg.openqa.selenium.WebElement
-
getSize
public org.openqa.selenium.Dimension getSize()
- Specified by:
getSize
in interfaceorg.openqa.selenium.WebElement
-
getRect
public org.openqa.selenium.Rectangle getRect()
- Specified by:
getRect
in interfaceorg.openqa.selenium.WebElement
-
getCssValue
public String getCssValue(String propertyName)
- Specified by:
getCssValue
in interfaceorg.openqa.selenium.WebElement
-
containsElements
public boolean containsElements(org.openqa.selenium.By bySelector)
- Specified by:
containsElements
in interfaceWebElementFacade
-
containsElements
public boolean containsElements(String xpathOrCssSelector)
- Specified by:
containsElements
in interfaceWebElementFacade
-
shouldContainElements
public void shouldContainElements(org.openqa.selenium.By bySelector)
- Specified by:
shouldContainElements
in interfaceWebElementFacade
-
shouldContainElements
public void shouldContainElements(String xpathOrCssSelector)
- Specified by:
shouldContainElements
in interfaceWebElementFacade
-
hasClass
public boolean hasClass(String cssClassName)
- Specified by:
hasClass
in interfaceWebElementFacade
-
foundBy
public WebElementFacade foundBy(String foundBy)
-
getCoordinates
public org.openqa.selenium.interactions.Coordinates getCoordinates()
- Specified by:
getCoordinates
in interfaceorg.openqa.selenium.interactions.Locatable
-
getWrappedElement
public org.openqa.selenium.WebElement getWrappedElement()
- Specified by:
getWrappedElement
in interfaceorg.openqa.selenium.WrapsElement
-
-