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

public interface GrapheneElement extends org.openqa.selenium.WebElement, org.openqa.selenium.interactions.Locatable, org.openqa.selenium.WrapsElement, GrapheneElementAction

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 Type
    Method
    Description
    findElement(org.openqa.selenium.By by)
    Overriden version of WebElement.findBy() method.
    findGrapheneElements(org.openqa.selenium.By by)
    This method is alternative to WebElement.findElements(By), but it returns list of type GrapheneElement.
    boolean
    Returns true if this element is present in the page

    Methods inherited from interface org.jboss.arquillian.graphene.GrapheneElementAction

    doubleClick, writeIntoElement

    Methods inherited from interface org.openqa.selenium.interactions.Locatable

    getCoordinates

    Methods inherited from interface org.openqa.selenium.TakesScreenshot

    getScreenshotAs

    Methods 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, submit

    Methods 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 into NoSuchElementException. 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

      List<GrapheneElement> findGrapheneElements(org.openqa.selenium.By by)
      This method is alternative to WebElement.findElements(By), but it returns list of type GrapheneElement.
      Returns:
      list of elements
      See Also:
      • WebElement.findElement(By)
    • findElement

      GrapheneElement findElement(org.openqa.selenium.By by)
      Overriden version of WebElement.findBy() method.
      Specified by:
      findElement in interface org.openqa.selenium.SearchContext
      Specified by:
      findElement in interface org.openqa.selenium.WebElement
      Returns:
      GrapheneElement
      See Also:
      • WebElement.findElement(By)