public interface GrapheneElement
extends 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: 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.
Modifier and Type | Method and Description |
---|---|
GrapheneElement |
findElement(org.openqa.selenium.By by)
Overriden version of
WebElement.findBy() method. |
List<GrapheneElement> |
findGrapheneElements(org.openqa.selenium.By by)
This method is alternative to
WebElement.findElements(By) , but it returns list of type GrapheneElement . |
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 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.
List<GrapheneElement> findGrapheneElements(org.openqa.selenium.By by)
WebElement.findElements(By)
, but it returns list of type GrapheneElement
.WebElement.findElement(By)
GrapheneElement findElement(org.openqa.selenium.By by)
WebElement.findBy()
method.findElement
in interface org.openqa.selenium.SearchContext
findElement
in interface org.openqa.selenium.WebElement
WebElement.findElement(By)
Copyright © 2016 JBoss by Red Hat. All rights reserved.