Interface GrapheneElement
- All Superinterfaces:
GrapheneElementAction,org.openqa.selenium.interactions.Locatable,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
Interface for Graphene extensions of WebElement.
Following methods are provided over the WebElement interface:
Important: GrapheneElementImpl is not intended for extension, do not subclass it. The
GrapheneElementImpl might become abstract class or interface in the future. It can't be final because then it couldn't be
proxied by Graphene.
- Author:
- Jan Papousek
-
Method Summary
Modifier and TypeMethodDescriptionfindElement(org.openqa.selenium.By by) Overriden version ofWebElement.findBy()method.findGrapheneElements(org.openqa.selenium.By by) This method is alternative toWebElement.findElements(By), but it returns list of typeGrapheneElement.booleanReturns true if this element is present in the pageMethods inherited from interface org.jboss.arquillian.graphene.GrapheneElementAction
doubleClick, writeIntoElementMethods inherited from interface org.openqa.selenium.interactions.Locatable
getCoordinatesMethods inherited from interface org.openqa.selenium.TakesScreenshot
getScreenshotAsMethods inherited from interface org.openqa.selenium.WebElement
clear, click, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submitMethods inherited from interface org.openqa.selenium.WrapsElement
getWrappedElement
-
Method Details
-
isPresent
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 intoNoSuchElementException. To prevent this behavior, you should first check that the element is present in the page using this method.- Returns:
- true if this element is present in the page
-
findGrapheneElements
This method is alternative toWebElement.findElements(By), but it returns list of typeGrapheneElement.- Returns:
- list of elements
- See Also:
-
WebElement.findElement(By)
-
findElement
Overriden version ofWebElement.findBy()method.- Specified by:
findElementin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementin interfaceorg.openqa.selenium.WebElement- Returns:
- GrapheneElement
- See Also:
-
WebElement.findElement(By)
-