
public class GrapheneElement extends Object implements org.openqa.selenium.WebElement, org.openqa.selenium.internal.Locatable, org.openqa.selenium.internal.WrapsElement
Interface for Graphene extensions of WebElement.
Following methods are provided over the WebElement interface:
Important: GrapheneElement is not intended for extension, do not subclass it. The GrapheneElement might become abstract class or interface in the future. It can't be final because then it couldn't be proxied by Graphene.
| Constructor and Description |
|---|
GrapheneElement(org.openqa.selenium.WebElement element) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
click() |
GrapheneElement |
findElement(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
List<GrapheneElement> |
findGrapheneElements(org.openqa.selenium.By by)
This method is alternative to
findElements(By), but it returns list of type GrapheneElement. |
String |
getAttribute(String name) |
org.openqa.selenium.interactions.internal.Coordinates |
getCoordinates() |
String |
getCssValue(String propertyName) |
org.openqa.selenium.Point |
getLocation() |
org.openqa.selenium.Dimension |
getSize() |
String |
getTagName() |
String |
getText() |
org.openqa.selenium.WebElement |
getWrappedElement() |
boolean |
isDisplayed() |
boolean |
isEnabled() |
boolean |
isPresent()
Returns true if this element is present in the page
Note: WebDriver generally does not need this method since their elements are traditionally returned by calls as
SearchContext.findElement(By). |
boolean |
isSelected() |
void |
sendKeys(CharSequence... keysToSend) |
void |
submit() |
public boolean isPresent()
Returns true if this element is present in the page
Note: WebDriver generally does not need this method since their elements are traditionally returned by calls as
SearchContext.findElement(By). However Graphene de-references elements in time of call, and the object exposed
publicly is just an proxy object. In that case we can call any method on that object which can lead into
NoSuchElementException. To prevent this behavior, you should first check that the element is present in the page
using this method.
public List<GrapheneElement> findGrapheneElements(org.openqa.selenium.By by)
findElements(By), but it returns list of type GrapheneElement.WebElement.findElement(By)public void click()
click in interface org.openqa.selenium.WebElementpublic void submit()
submit in interface org.openqa.selenium.WebElementpublic void sendKeys(CharSequence... keysToSend)
sendKeys in interface org.openqa.selenium.WebElementpublic void clear()
clear in interface org.openqa.selenium.WebElementpublic String getTagName()
getTagName in interface org.openqa.selenium.WebElementpublic String getAttribute(String name)
getAttribute in interface org.openqa.selenium.WebElementpublic boolean isSelected()
isSelected in interface org.openqa.selenium.WebElementpublic boolean isEnabled()
isEnabled in interface org.openqa.selenium.WebElementpublic String getText()
getText 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 GrapheneElement 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.LocatableCopyright © 2013 JBoss by Red Hat. All Rights Reserved.