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 java.lang.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
Modifier and Type Method Description WebElementFacadeand()Convenience method to chain method calls more fluently.voidclear()voidclick()Wait for an element to be visible and enabled, and then click on it.voidclick(ClickStrategy clickStrategy)Click on an element, with or without waiting for it to be visible and enabledbooleancontainsElements(java.lang.String xpathOrCssSelector)booleancontainsElements(org.openqa.selenium.By bySelector)booleancontainsOnlyText(java.lang.String value)Does this element exactly match given text?booleancontainsSelectOption(java.lang.String value)Does this dropdown contain the specified value.booleancontainsText(java.lang.String value)Does this element contain a given text?booleancontainsValue(java.lang.String value)Does this element contain a given value attribute?FluentDropdownDeselectdeselect()WebElementFacadedeselectAll()Deprecated.WebElementFacadedeselectByIndex(int indexValue)Deprecated.WebElementFacadedeselectByValue(java.lang.String value)Deprecated.WebElementFacadedeselectByVisibleText(java.lang.String label)Deprecated.protected booleandriverIsDisabled()WebElementStateexpect(java.lang.String errorMessage)protected WebElementStateexpectingErrorMessage(java.lang.String errorMessage)WebElementFacadefind(org.openqa.selenium.By bySelector)<T extends WebElementFacade>
TfindBy(java.lang.String xpathOrCssSelector)<T extends WebElementFacade>
TfindBy(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)WebElementFacadefindBy(org.openqa.selenium.By selector)org.openqa.selenium.WebElementfindElement(java.lang.String by, java.lang.String using)org.openqa.selenium.WebElementfindElement(org.openqa.selenium.By by)org.openqa.selenium.WebElementfindElementByAccessibilityId(java.lang.String id)org.openqa.selenium.WebElementfindElementByAndroidUIAutomator(java.lang.String using)java.util.ListfindElements(java.lang.String by, java.lang.String using)java.util.List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.By by)java.util.List<org.openqa.selenium.WebElement>findElementsByAccessibilityId(java.lang.String id)java.util.List<org.openqa.selenium.WebElement>findElementsByAndroidUIAutomator(java.lang.String using)WebElementFacadefoundBy(java.lang.String foundBy)java.lang.StringgetAttribute(java.lang.String name)protected InternalSystemClockgetClock()org.openqa.selenium.interactions.CoordinatesgetCoordinates()java.lang.StringgetCssValue(java.lang.String propertyName)java.time.DurationgetCurrentImplicitTimeout()org.openqa.selenium.WebElementgetElement()protected java.lang.StringgetErrorMessage(java.lang.String defaultErrorMessage)java.lang.StringgetFirstSelectedOptionValue()java.lang.StringgetFirstSelectedOptionVisibleText()java.lang.StringgetFoundBy()java.time.DurationgetImplicitTimeout()longgetImplicitTimeoutInMilliseconds()protected JavascriptExecutorFacadegetJavascriptExecutorFacade()org.openqa.selenium.PointgetLocation()org.openqa.selenium.support.pagefactory.ElementLocatorgetLocator()org.openqa.selenium.RectanglegetRect()<X> XgetScreenshotAs(org.openqa.selenium.OutputType<X> target)java.lang.StringgetSelectedValue()java.util.List<java.lang.String>getSelectedValues()java.util.List<java.lang.String>getSelectedVisibleTexts()java.lang.StringgetSelectedVisibleTextValue()java.util.List<java.lang.String>getSelectOptions()org.openqa.selenium.DimensiongetSize()java.lang.StringgetTagName()java.lang.StringgetText()java.lang.StringgetTextContent()java.lang.StringgetTextValue()java.lang.StringgetValue()org.openqa.selenium.WebElementgetWrappedElement()booleanhasClass(java.lang.String cssClassName)booleanhasFocus()Does this element currently have the focus.booleanisClickable()Check to see if the element is clickablebooleanisCurrentlyEnabled()booleanisCurrentlyVisible()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.booleanisDisabled()booleanisDisplayed()Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.booleanisEnabled()booleanisPresent()Returns true if an element is present on the screen, whether visible or not.booleanisSelected()booleanisVisible()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 voidnotifyScreenChange()java.time.DurationresetTimeouts()FluentDropdownSelectselect()WebElementFacadeselectByIndex(int indexValue)Deprecated.WebElementFacadeselectByValue(java.lang.String value)Deprecated.WebElementFacadeselectByVisibleText(java.lang.String label)Deprecated.voidsendKeys(java.lang.CharSequence... keysToSend)voidsetImplicitTimeout(java.time.Duration implicitTimeout)voidsetWindowFocus()voidshouldBeCurrentlyVisible()Checks whether a web element is visible.voidshouldBeEnabled()voidshouldBePresent()voidshouldBeVisible()Checks whether a web element is visible.voidshouldContainElements(java.lang.String xpathOrCssSelector)voidshouldContainElements(org.openqa.selenium.By bySelector)voidshouldContainOnlyText(java.lang.String textValue)Check that an element exactly matches a text valuevoidshouldContainSelectedOption(java.lang.String textValue)voidshouldContainText(java.lang.String textValue)Check that an element contains a text valuevoidshouldNotBeCurrentlyVisible()Checks whether a web element is not visible straight away.voidshouldNotBeEnabled()voidshouldNotBePresent()voidshouldNotBeVisible()Checks whether a web element is not visible.voidshouldNotContainText(java.lang.String textValue)Check that an element does not contain a text valuevoidsubmit()WebElementFacadethen()Convenience method to chain method calls more fluently.WebElementFacadethen(java.lang.String xpathOrCssSelector)WebElementFacadethen(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)WebElementFacadethen(org.openqa.selenium.By bySelector)WebElementFacadethenFind(java.lang.String xpathOrCssSelector)WebElementFacadethenFind(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)ListOfWebElementFacadesthenFindAll(java.lang.String xpathOrCssSelector)ListOfWebElementFacadesthenFindAll(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)ListOfWebElementFacadesthenFindAll(org.openqa.selenium.By selector)longtimeoutInMilliseconds()java.lang.StringtoString()WebElementFacadetype(java.lang.CharSequence... keysToSend)Type a value into a field, making sure that the field is empty first.WebElementFacadetypeAndEnter(java.lang.String value)Type a value into a field and then press Enter, making sure that the field is empty first.WebElementFacadetypeAndTab(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()WebElementFacadewaitUntilClickable()WebElementFacadewaitUntilDisabled()protected voidwaitUntilElementAvailable()protected voidwaitUntilElementPresent()WebElementFacadewaitUntilEnabled()WebElementFacadewaitUntilNotVisible()WebElementFacadewaitUntilPresent()WebElementFacadewaitUntilVisible()WebElementFacadewithTimeoutOf(int timeout, java.time.temporal.TemporalUnit unit)WebElementFacadewithTimeoutOf(int timeout, java.util.concurrent.TimeUnit unit)WebElementFacadewithTimeoutOf(java.time.Duration duration)static <T extends WebElementFacade>
TwrapWebElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By bySelector, long timeoutInMilliseconds, long waitForTimeoutInMilliseconds, java.lang.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, java.lang.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, java.lang.String foundBy)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
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 Details
-
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, java.lang.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, java.lang.String foundBy) -
wrapWebElement
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) -
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:
getElementin interfaceWebElementFacade
-
getJavascriptExecutorFacade
-
getClock
-
then
- Specified by:
thenin interfaceWebElementFacade
-
thenFind
public WebElementFacade thenFind(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)- Specified by:
thenFindin interfaceWebElementFacade
-
thenFind
- Specified by:
thenFindin interfaceWebElementFacade
-
then
- Specified by:
thenin interfaceWebElementFacade
-
findBy
- Specified by:
findByin interfaceWebElementFacade
-
findBy
public <T extends WebElementFacade> T findBy(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)- Specified by:
findByin interfaceWebElementFacade
-
timeoutInMilliseconds
public long timeoutInMilliseconds() -
thenFindAll
- Specified by:
thenFindAllin interfaceWebElementFacade
-
thenFindAll
public ListOfWebElementFacades thenFindAll(java.lang.String xpathOrCssSelector, java.lang.Object... arguments)- Specified by:
thenFindAllin interfaceWebElementFacade
-
findBy
- Specified by:
findByin interfaceWebElementFacade
-
find
- Specified by:
findin interfaceWebElementFacade
-
then
- Specified by:
thenin interfaceWebElementFacade
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)- Specified by:
getAttributein interfaceorg.openqa.selenium.WebElement- Specified by:
getAttributein interfaceWebElementFacade
-
thenFindAll
- Specified by:
thenFindAllin interfaceWebElementFacade
-
findElementByAccessibilityId
public org.openqa.selenium.WebElement findElementByAccessibilityId(java.lang.String id)- Specified by:
findElementByAccessibilityIdin interfaceio.appium.java_client.FindsByAccessibilityId
-
findElementsByAccessibilityId
public java.util.List<org.openqa.selenium.WebElement> findElementsByAccessibilityId(java.lang.String id)- Specified by:
findElementsByAccessibilityIdin interfaceio.appium.java_client.FindsByAccessibilityId
-
findElementByAndroidUIAutomator
public org.openqa.selenium.WebElement findElementByAndroidUIAutomator(java.lang.String using)- Specified by:
findElementByAndroidUIAutomatorin interfaceio.appium.java_client.FindsByAndroidUIAutomator
-
findElementsByAndroidUIAutomator
public java.util.List<org.openqa.selenium.WebElement> findElementsByAndroidUIAutomator(java.lang.String using)- Specified by:
findElementsByAndroidUIAutomatorin interfaceio.appium.java_client.FindsByAndroidUIAutomator
-
getImplicitTimeoutInMilliseconds
public long getImplicitTimeoutInMilliseconds()- Specified by:
getImplicitTimeoutInMillisecondsin interfaceWebElementFacade
-
getImplicitTimeout
public java.time.Duration getImplicitTimeout() -
withTimeoutOf
- Specified by:
withTimeoutOfin interfaceWebElementFacade
-
withTimeoutOf
- Specified by:
withTimeoutOfin interfaceWebElementFacade
-
withTimeoutOf
- Specified by:
withTimeoutOfin 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:
isVisiblein interfaceWebElementState
-
and
Convenience method to chain method calls more fluently.- Specified by:
andin interfaceWebElementFacade
-
then
Convenience method to chain method calls more fluently.- Specified by:
thenin 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:
isCurrentlyVisiblein interfaceWebElementState
-
isCurrentlyEnabled
public boolean isCurrentlyEnabled()- Specified by:
isCurrentlyEnabledin interfaceWebElementState
-
shouldBeVisible
public void shouldBeVisible()Checks whether a web element is visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldBeVisiblein interfaceWebElementState
-
shouldBeCurrentlyVisible
public void shouldBeCurrentlyVisible()Checks whether a web element is visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldBeCurrentlyVisiblein interfaceWebElementState
-
shouldNotBeVisible
public void shouldNotBeVisible()Checks whether a web element is not visible. Throws an AssertionError if the element is not rendered.- Specified by:
shouldNotBeVisiblein 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:
shouldNotBeCurrentlyVisiblein interfaceWebElementState
-
hasFocus
public boolean hasFocus()Does this element currently have the focus.- Specified by:
hasFocusin interfaceWebElementState
-
containsText
public boolean containsText(java.lang.String value)Does this element contain a given text?- Specified by:
containsTextin interfaceWebElementState
-
containsValue
public boolean containsValue(java.lang.String value)Description copied from interface:WebElementStateDoes this element contain a given value attribute?- Specified by:
containsValuein interfaceWebElementState
-
containsOnlyText
public boolean containsOnlyText(java.lang.String value)Does this element exactly match given text?- Specified by:
containsOnlyTextin interfaceWebElementState
-
containsSelectOption
public boolean containsSelectOption(java.lang.String value)Does this dropdown contain the specified value.- Specified by:
containsSelectOptionin interfaceWebElementState
-
getSelectOptions
public java.util.List<java.lang.String> getSelectOptions()- Specified by:
getSelectOptionsin interfaceWebElementFacade- Specified by:
getSelectOptionsin interfaceWebElementState
-
getLocator
public org.openqa.selenium.support.pagefactory.ElementLocator getLocator() -
setImplicitTimeout
public void setImplicitTimeout(java.time.Duration implicitTimeout)- Specified by:
setImplicitTimeoutin interfaceConfigurableTimeouts
-
getCurrentImplicitTimeout
public java.time.Duration getCurrentImplicitTimeout()- Specified by:
getCurrentImplicitTimeoutin interfaceConfigurableTimeouts
-
resetTimeouts
public java.time.Duration resetTimeouts()- Specified by:
resetTimeoutsin interfaceConfigurableTimeouts
-
getFoundBy
public java.lang.String getFoundBy() -
shouldContainText
public void shouldContainText(java.lang.String textValue)Check that an element contains a text value- Specified by:
shouldContainTextin interfaceWebElementState- Parameters:
textValue-
-
shouldContainOnlyText
public void shouldContainOnlyText(java.lang.String textValue)Check that an element exactly matches a text value- Specified by:
shouldContainOnlyTextin interfaceWebElementState- Parameters:
textValue-
-
shouldContainSelectedOption
public void shouldContainSelectedOption(java.lang.String textValue)- Specified by:
shouldContainSelectedOptionin interfaceWebElementState
-
shouldNotContainText
public void shouldNotContainText(java.lang.String textValue)Check that an element does not contain a text value- Specified by:
shouldNotContainTextin interfaceWebElementState- Parameters:
textValue-
-
shouldBeEnabled
public void shouldBeEnabled()- Specified by:
shouldBeEnabledin interfaceWebElementState
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.openqa.selenium.WebElement- Specified by:
isEnabledin interfaceWebElementState
-
shouldNotBeEnabled
public void shouldNotBeEnabled()- Specified by:
shouldNotBeEnabledin interfaceWebElementState
-
isClickable
public boolean isClickable()Check to see if the element is clickable- Specified by:
isClickablein interfaceWebElementState
-
type
Type a value into a field, making sure that the field is empty first.- Specified by:
typein interfaceWebElementFacade- Parameters:
keysToSend-
-
typeAndEnter
Type a value into a field and then press Enter, making sure that the field is empty first.- Specified by:
typeAndEnterin interfaceWebElementFacade- Parameters:
value-
-
typeAndTab
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:
typeAndTabin interfaceWebElementFacade- Parameters:
value-
-
setWindowFocus
public void setWindowFocus()- Specified by:
setWindowFocusin interfaceWebElementFacade
-
select
- Specified by:
selectin interfaceWebElementFacade
-
deselect
- Specified by:
deselectin interfaceWebElementFacade
-
deselectAll
Deprecated.- Specified by:
deselectAllin interfaceWebElementFacade
-
deselectByIndex
Deprecated.- Specified by:
deselectByIndexin interfaceWebElementFacade
-
deselectByVisibleText
Deprecated.- Specified by:
deselectByVisibleTextin interfaceWebElementFacade
-
deselectByValue
Deprecated.- Specified by:
deselectByValuein interfaceWebElementFacade
-
selectByVisibleText
Deprecated.- Specified by:
selectByVisibleTextin interfaceWebElementFacade
-
getSelectedVisibleTextValue
public java.lang.String getSelectedVisibleTextValue()- Specified by:
getSelectedVisibleTextValuein interfaceWebElementState
-
getFirstSelectedOptionVisibleText
public java.lang.String getFirstSelectedOptionVisibleText()- Specified by:
getFirstSelectedOptionVisibleTextin interfaceWebElementFacade
-
getSelectedVisibleTexts
public java.util.List<java.lang.String> getSelectedVisibleTexts()- Specified by:
getSelectedVisibleTextsin interfaceWebElementFacade
-
getFirstSelectedOptionValue
public java.lang.String getFirstSelectedOptionValue()- Specified by:
getFirstSelectedOptionValuein interfaceWebElementFacade
-
getSelectedValues
public java.util.List<java.lang.String> getSelectedValues()- Specified by:
getSelectedValuesin interfaceWebElementFacade
-
selectByValue
Deprecated.- Specified by:
selectByValuein interfaceWebElementFacade
-
getSelectedValue
public java.lang.String getSelectedValue()- Specified by:
getSelectedValuein interfaceWebElementState
-
selectByIndex
Deprecated.- Specified by:
selectByIndexin interfaceWebElementFacade
-
getScreenshotAs
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target) throws org.openqa.selenium.WebDriverException- Specified by:
getScreenshotAsin 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:
isPresentin interfaceWebElementState
-
shouldBePresent
public void shouldBePresent()- Specified by:
shouldBePresentin interfaceWebElementState
-
shouldNotBePresent
public void shouldNotBePresent()- Specified by:
shouldNotBePresentin interfaceWebElementState
-
waitUntilVisible
- Specified by:
waitUntilVisiblein interfaceWebElementFacade
-
waitUntilPresent
- Specified by:
waitUntilPresentin interfaceWebElementFacade
-
waitForCondition
public org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> waitForCondition()- Specified by:
waitForConditionin interfaceWebElementFacade
-
waitUntilNotVisible
- Specified by:
waitUntilNotVisiblein interfaceWebElementFacade
-
getValue
public java.lang.String getValue()- Specified by:
getValuein interfaceWebElementFacade- Specified by:
getValuein interfaceWebElementState
-
isSelected
public boolean isSelected()- Specified by:
isSelectedin interfaceorg.openqa.selenium.WebElement- Specified by:
isSelectedin interfaceWebElementState
-
getText
public java.lang.String getText()- Specified by:
getTextin interfaceorg.openqa.selenium.WebElement- Specified by:
getTextin interfaceWebElementFacade- Specified by:
getTextin interfaceWebElementState
-
getTextContent
public java.lang.String getTextContent()- Specified by:
getTextContentin interfaceWebElementFacade
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfaceWebElementFacade- Specified by:
isDisabledin interfaceWebElementState
-
waitUntilEnabled
- Specified by:
waitUntilEnabledin interfaceWebElementFacade
-
waitUntilClickable
- Specified by:
waitUntilClickablein interfaceWebElementFacade
-
waitUntilDisabled
- Specified by:
waitUntilDisabledin interfaceWebElementFacade
-
getTextValue
public java.lang.String getTextValue()- Specified by:
getTextValuein interfaceWebElementState
-
expect
- Specified by:
expectin interfaceWebElementState
-
expectingErrorMessage
-
getErrorMessage
protected java.lang.String getErrorMessage(java.lang.String defaultErrorMessage) -
click
Click on an element, with or without waiting for it to be visible and enabled- Specified by:
clickin interfaceWebElementFacade
-
click
public void click()Wait for an element to be visible and enabled, and then click on it.- Specified by:
clickin interfaceorg.openqa.selenium.WebElement- Specified by:
clickin interfaceWebElementFacade
-
clear
public void clear()- Specified by:
clearin interfaceorg.openqa.selenium.WebElement- Specified by:
clearin interfaceWebElementFacade
-
notifyScreenChange
protected void notifyScreenChange() -
toString
public java.lang.String toString()- Specified by:
toStringin interfaceWebElementFacade- Overrides:
toStringin classjava.lang.Object
-
submit
public void submit()- Specified by:
submitin interfaceorg.openqa.selenium.WebElement
-
sendKeys
public void sendKeys(java.lang.CharSequence... keysToSend)- Specified by:
sendKeysin interfaceorg.openqa.selenium.WebElement
-
getTagName
public java.lang.String getTagName()- Specified by:
getTagNamein interfaceorg.openqa.selenium.WebElement
-
findElements
public java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)- Specified by:
findElementsin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementsin interfaceorg.openqa.selenium.WebElement
-
findElement
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)- Specified by:
findElementin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementin interfaceorg.openqa.selenium.WebElement
-
findElement
public org.openqa.selenium.WebElement findElement(java.lang.String by, java.lang.String using)- Specified by:
findElementin interfaceio.appium.java_client.FindsByFluentSelector
-
findElements
public java.util.List findElements(java.lang.String by, java.lang.String using)- Specified by:
findElementsin 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:
isDisplayedin interfaceorg.openqa.selenium.WebElement- Returns:
- Whether or not the element is displayed
-
getLocation
public org.openqa.selenium.Point getLocation()- Specified by:
getLocationin interfaceorg.openqa.selenium.WebElement
-
getSize
public org.openqa.selenium.Dimension getSize()- Specified by:
getSizein interfaceorg.openqa.selenium.WebElement
-
getRect
public org.openqa.selenium.Rectangle getRect()- Specified by:
getRectin interfaceorg.openqa.selenium.WebElement
-
getCssValue
public java.lang.String getCssValue(java.lang.String propertyName)- Specified by:
getCssValuein interfaceorg.openqa.selenium.WebElement
-
containsElements
public boolean containsElements(org.openqa.selenium.By bySelector)- Specified by:
containsElementsin interfaceWebElementFacade
-
containsElements
public boolean containsElements(java.lang.String xpathOrCssSelector)- Specified by:
containsElementsin interfaceWebElementFacade
-
shouldContainElements
public void shouldContainElements(org.openqa.selenium.By bySelector)- Specified by:
shouldContainElementsin interfaceWebElementFacade
-
shouldContainElements
public void shouldContainElements(java.lang.String xpathOrCssSelector)- Specified by:
shouldContainElementsin interfaceWebElementFacade
-
hasClass
public boolean hasClass(java.lang.String cssClassName)- Specified by:
hasClassin interfaceWebElementFacade
-
foundBy
-
getCoordinates
public org.openqa.selenium.interactions.Coordinates getCoordinates()- Specified by:
getCoordinatesin interfaceorg.openqa.selenium.interactions.Locatable
-
getWrappedElement
public org.openqa.selenium.WebElement getWrappedElement()- Specified by:
getWrappedElementin interfaceorg.openqa.selenium.WrapsElement
-