|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectnet.thucydides.core.pages.WebElementFacadeImpl
public class WebElementFacadeImpl
A proxy class for a web element, providing some more methods.
| Constructor Summary | |
|---|---|
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
long timeoutInMilliseconds)
|
|
WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement webElement,
long timeoutInMilliseconds)
Deprecated. As of release 0.9.127, replaced by static wrapWebElement(WebDriver driver,WebElement webElement,long timeoutInMilliseconds) |
|
| Method Summary | |
|---|---|
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 |
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? |
WebElementFacade |
find(org.openqa.selenium.By bySelector)
|
WebElementFacade |
findBy(org.openqa.selenium.By selector)
|
WebElementFacade |
findBy(String xpathOrCssSelector)
|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by)
|
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by)
|
String |
getAttribute(String name)
|
protected InternalSystemClock |
getClock()
|
org.openqa.selenium.interactions.internal.Coordinates |
getCoordinates()
|
String |
getCssValue(String propertyName)
|
protected org.openqa.selenium.WebElement |
getElement()
|
protected JavascriptExecutorFacade |
getJavascriptExecutorFacade()
|
org.openqa.selenium.Point |
getLocation()
|
String |
getSelectedValue()
|
String |
getSelectedVisibleTextValue()
|
List<String> |
getSelectOptions()
|
org.openqa.selenium.Dimension |
getSize()
|
String |
getTagName()
|
String |
getText()
|
String |
getTextValue()
|
long |
getTimeoutInMilliseconds()
|
String |
getValue()
|
org.openqa.selenium.WebElement |
getWrappedElement()
|
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()
|
boolean |
isEnabled()
|
boolean |
isPresent()
|
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. |
WebElementFacade |
selectByIndex(int indexValue)
|
WebElementFacade |
selectByValue(String value)
|
WebElementFacade |
selectByVisibleText(String label)
|
void |
sendKeys(CharSequence... keysToSend)
|
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 |
shouldContainOnlyText(String textValue)
Check that an element exactly matches a text value |
void |
shouldContainSelectedOption(String textValue)
|
void |
shouldContainText(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(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(String xpathOrCssSelector)
|
List<WebElementFacade> |
thenFindAll(org.openqa.selenium.By selector)
|
List<WebElementFacade> |
thenFindAll(String xpathOrCssSelector)
|
String |
toString()
|
WebElementFacade |
type(String value)
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 |
waitUntilDisabled()
|
WebElementFacade |
waitUntilEnabled()
|
WebElementFacade |
waitUntilNotVisible()
|
WebElementFacade |
waitUntilPresent()
|
WebElementFacade |
waitUntilVisible()
|
WebElementFacade |
withTimeoutOf(int timeout,
TimeUnit unit)
|
static WebElementFacadeImpl |
wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
long timeoutInMilliseconds)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement webElement,
long timeoutInMilliseconds)
wrapWebElement(WebDriver driver,WebElement webElement,long timeoutInMilliseconds)
driver - webElement - timeoutInMilliseconds -
public WebElementFacadeImpl(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
long timeoutInMilliseconds)
| Method Detail |
|---|
public static WebElementFacadeImpl wrapWebElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
long timeoutInMilliseconds)
protected org.openqa.selenium.WebElement getElement()
protected JavascriptExecutorFacade getJavascriptExecutorFacade()
protected InternalSystemClock getClock()
public WebElementFacade then(String xpathOrCssSelector)
then in interface WebElementFacadepublic WebElementFacade findBy(String xpathOrCssSelector)
findBy in interface WebElementFacadepublic List<WebElementFacade> thenFindAll(String xpathOrCssSelector)
thenFindAll in interface WebElementFacadepublic WebElementFacade findBy(org.openqa.selenium.By selector)
findBy in interface WebElementFacadepublic WebElementFacade find(org.openqa.selenium.By bySelector)
find in interface WebElementFacadepublic WebElementFacade then(org.openqa.selenium.By bySelector)
then in interface WebElementFacadepublic String getAttribute(String name)
getAttribute in interface WebElementFacadegetAttribute in interface org.openqa.selenium.WebElementpublic List<WebElementFacade> thenFindAll(org.openqa.selenium.By selector)
thenFindAll in interface WebElementFacadepublic long getTimeoutInMilliseconds()
getTimeoutInMilliseconds in interface WebElementFacade
public WebElementFacade withTimeoutOf(int timeout,
TimeUnit unit)
withTimeoutOf in interface WebElementFacadepublic boolean isVisible()
isVisible in interface WebElementStatepublic WebElementFacade and()
and in interface WebElementFacadepublic WebElementFacade then()
then in interface WebElementFacadepublic boolean isCurrentlyVisible()
isCurrentlyVisible in interface WebElementStatepublic boolean isCurrentlyEnabled()
isCurrentlyEnabled in interface WebElementStatepublic void shouldBeVisible()
shouldBeVisible in interface WebElementStatepublic void shouldBeCurrentlyVisible()
shouldBeCurrentlyVisible in interface WebElementStatepublic void shouldNotBeVisible()
shouldNotBeVisible in interface WebElementStatepublic void shouldNotBeCurrentlyVisible()
shouldNotBeCurrentlyVisible in interface WebElementStatepublic boolean hasFocus()
hasFocus in interface WebElementStatepublic boolean containsText(String value)
containsText in interface WebElementStatepublic boolean containsOnlyText(String value)
containsOnlyText in interface WebElementStatepublic boolean containsSelectOption(String value)
containsSelectOption in interface WebElementStatepublic List<String> getSelectOptions()
getSelectOptions in interface WebElementFacadepublic void shouldContainText(String textValue)
shouldContainText in interface WebElementStatetextValue - public void shouldContainOnlyText(String textValue)
shouldContainOnlyText in interface WebElementStatetextValue - public void shouldContainSelectedOption(String textValue)
shouldContainSelectedOption in interface WebElementStatepublic void shouldNotContainText(String textValue)
shouldNotContainText in interface WebElementStatetextValue - public void shouldBeEnabled()
shouldBeEnabled in interface WebElementStatepublic boolean isEnabled()
isEnabled in interface WebElementStateisEnabled in interface org.openqa.selenium.WebElementpublic void shouldNotBeEnabled()
shouldNotBeEnabled in interface WebElementStatepublic WebElementFacade type(String value)
type in interface WebElementFacadevalue - public WebElementFacade typeAndEnter(String value)
typeAndEnter in interface WebElementFacadevalue - public WebElementFacade typeAndTab(String value)
typeAndTab in interface WebElementFacadevalue - public void setWindowFocus()
setWindowFocus in interface WebElementFacadepublic WebElementFacade selectByVisibleText(String label)
selectByVisibleText in interface WebElementFacadepublic String getSelectedVisibleTextValue()
getSelectedVisibleTextValue in interface WebElementStatepublic WebElementFacade selectByValue(String value)
selectByValue in interface WebElementFacadepublic String getSelectedValue()
getSelectedValue in interface WebElementStatepublic WebElementFacade selectByIndex(int indexValue)
selectByIndex in interface WebElementFacadepublic boolean isPresent()
isPresent in interface WebElementStatepublic void shouldBePresent()
shouldBePresent in interface WebElementStatepublic void shouldNotBePresent()
shouldNotBePresent in interface WebElementStatepublic WebElementFacade waitUntilVisible()
waitUntilVisible in interface WebElementFacadepublic WebElementFacade waitUntilPresent()
waitUntilPresent in interface WebElementFacadepublic org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> waitForCondition()
waitForCondition in interface WebElementFacadepublic WebElementFacade waitUntilNotVisible()
waitUntilNotVisible in interface WebElementFacadepublic String getValue()
getValue in interface WebElementFacadepublic boolean isSelected()
isSelected in interface WebElementStateisSelected in interface org.openqa.selenium.WebElementpublic String getText()
getText in interface WebElementFacadegetText in interface org.openqa.selenium.WebElementpublic WebElementFacade waitUntilEnabled()
waitUntilEnabled in interface WebElementFacadepublic WebElementFacade waitUntilDisabled()
waitUntilDisabled in interface WebElementFacadepublic String getTextValue()
getTextValue in interface WebElementStatepublic void click()
click in interface WebElementFacadeclick in interface org.openqa.selenium.WebElementpublic void clear()
clear in interface WebElementFacadeclear in interface org.openqa.selenium.WebElementpublic String toString()
toString in interface WebElementFacadetoString in class Objectpublic void submit()
submit in interface org.openqa.selenium.WebElementpublic void sendKeys(CharSequence... keysToSend)
sendKeys in interface org.openqa.selenium.WebElementpublic String getTagName()
getTagName in interface org.openqa.selenium.WebElementpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebElementpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebElementpublic boolean isDisplayed()
isDisplayed in interface org.openqa.selenium.WebElementpublic org.openqa.selenium.Point getLocation()
getLocation in interface org.openqa.selenium.WebElementpublic org.openqa.selenium.Dimension getSize()
getSize in interface org.openqa.selenium.WebElementpublic String getCssValue(String propertyName)
getCssValue in interface org.openqa.selenium.WebElementpublic org.openqa.selenium.WebElement getWrappedElement()
getWrappedElement in interface org.openqa.selenium.internal.WrapsElementpublic org.openqa.selenium.interactions.internal.Coordinates getCoordinates()
getCoordinates in interface org.openqa.selenium.internal.Locatable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||