Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado
Class Graphene

java.lang.Object
  extended by org.jboss.arquillian.ajocado.Graphene

public final class Graphene
extends Object

Version:
$Revision$
Author:
Lukas Fryc

Field Summary
static AlertEquals alertEquals
           
static AlertPresent alertPresent
           
static AttributeEquals attributeEquals
           
static AttributePresent attributePresent
           
static CountEquals countEquals
           
static ElementNotPresent elementNotPresent
           
static ElementNotVisible elementNotVisible
           
static ElementPresent elementPresent
           
static ElementVisible elementVisible
           
static AttributeRetriever retrieveAttribute
           
static TextRetriever retrieveText
           
static StyleEquals styleEquals
           
static TextEquals textEquals
           
static int WAIT_AJAX_INTERVAL
           
static int WAIT_GUI_INTERVAL
           
static int WAIT_MODEL_INTERVAL
           
static AjaxWaiting waitAjax
           
static AjaxWaiting waitGui
           
static SeleniumWaiting waitModel
           
 
Method Summary
static
<T extends CompoundableLocator<T>>
T
child(T locator, T child, T... children)
           Prepares new locator from composition of locator with children.
static CssLocator css(String cssSelector)
          Gets element locator finding elements using CSS selectors.
static DomLocator dom(JavaScript javascriptExpression)
          Find an element by evaluating the specified JavaScript expression.
static GrapheneSelenium guardHttp(GrapheneSelenium selenium)
          Shortcut for registering a regular HTTP request on given selenium object.
static GrapheneSelenium guardNoRequest(GrapheneSelenium selenium)
          Shortcut for registering a guard for no request on given selenium object.
static GrapheneSelenium guardXhr(GrapheneSelenium selenium)
          Shortcut for registering a XMLHttpRequest on given selenium object.
static IdLocator id(String id)
          Locates the element with specified @id attribute.
static JQueryLocator jq(String jquerySelector)
          Locates the element using JQuery Selector syntax.
static LinkLocator link(String linkText)
          Locates the link (anchor) element which contains text matching the specified pattern.
static NameLocator name(String name)
          Locates the first element with the specified @name attribute.
static GrapheneSelenium waitForHttp(GrapheneSelenium selenium)
          Shortcut for registering guard waiting for interception of HTTP type request
static GrapheneSelenium waitForXhr(GrapheneSelenium selenium)
          Shortcut for registering guard waiting for interception of XHR type request
static XPathLocator xp(String xpath)
          Locates the element using XPath expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAIT_GUI_INTERVAL

public static final int WAIT_GUI_INTERVAL
See Also:
Constant Field Values

WAIT_AJAX_INTERVAL

public static final int WAIT_AJAX_INTERVAL
See Also:
Constant Field Values

WAIT_MODEL_INTERVAL

public static final int WAIT_MODEL_INTERVAL
See Also:
Constant Field Values

waitGui

public static final AjaxWaiting waitGui

waitAjax

public static final AjaxWaiting waitAjax

waitModel

public static final SeleniumWaiting waitModel

elementPresent

public static final ElementPresent elementPresent

elementNotPresent

public static final ElementNotPresent elementNotPresent

textEquals

public static final TextEquals textEquals

styleEquals

public static final StyleEquals styleEquals

attributePresent

public static final AttributePresent attributePresent

attributeEquals

public static final AttributeEquals attributeEquals

alertPresent

public static final AlertPresent alertPresent

alertEquals

public static final AlertEquals alertEquals

countEquals

public static final CountEquals countEquals

elementVisible

public static final ElementVisible elementVisible

elementNotVisible

public static final ElementNotVisible elementNotVisible

retrieveText

public static final TextRetriever retrieveText

retrieveAttribute

public static final AttributeRetriever retrieveAttribute
Method Detail

guardNoRequest

public static GrapheneSelenium guardNoRequest(GrapheneSelenium selenium)
Shortcut for registering a guard for no request on given selenium object.

Parameters:
selenium - where should be registered no request guard
Returns:
the selenium guarded to use no request during interaction

guardHttp

public static GrapheneSelenium guardHttp(GrapheneSelenium selenium)
Shortcut for registering a regular HTTP request on given selenium object.

Parameters:
selenium - where should be registered regular HTTP request guard
Returns:
the selenium guarded to use regular HTTP requests

guardXhr

public static GrapheneSelenium guardXhr(GrapheneSelenium selenium)
Shortcut for registering a XMLHttpRequest on given selenium object.

Parameters:
selenium - where should be registered XMLHttpRequest guard
Returns:
the selenium guarded to use XMLHttpRequest

waitForHttp

public static GrapheneSelenium waitForHttp(GrapheneSelenium selenium)
Shortcut for registering guard waiting for interception of HTTP type request

Parameters:
selenium - selenium where should be the guard registered
Returns:
the selenium waitinf for interception of HTTP type request

waitForXhr

public static GrapheneSelenium waitForXhr(GrapheneSelenium selenium)
Shortcut for registering guard waiting for interception of XHR type request

Parameters:
selenium - where should be the guard registered
Returns:
the selenium waiting for interception of XHR type request

css

public static CssLocator css(String cssSelector)
Gets element locator finding elements using CSS selectors.

Parameters:
cssSelector - the CSS selector
Returns:
the locator for given CSS selector

dom

public static DomLocator dom(JavaScript javascriptExpression)
Find an element by evaluating the specified JavaScript expression.

Parameters:
javascriptExpression - the JavaScript expression
Returns:
the locator for given JavaScript expression
See Also:
DomLocator

id

public static IdLocator id(String id)
Locates the element with specified @id attribute.

Parameters:
id - the @id attribute's value
Returns:
the locator with specified @id attribute

link

public static LinkLocator link(String linkText)
Locates the link (anchor) element which contains text matching the specified pattern.

Parameters:
linkText - the link (anchor) element's text
Returns:
the locator for given linkText

jq

public static JQueryLocator jq(String jquerySelector)
Locates the element using JQuery Selector syntax.

Parameters:
jquerySelector - the jquery selector
Returns:
the j query locator
See Also:
JQueryLocator

name

public static NameLocator name(String name)
Locates the first element with the specified @name attribute.

Parameters:
name - the @name attribute's value
Returns:
the locator for given @name attribute

xp

public static XPathLocator xp(String xpath)
Locates the element using XPath expression.

Parameters:
xpath - the xpath expression
Returns:
the xpath locator
See Also:
XPathLocator

child

public static <T extends CompoundableLocator<T>> T child(T locator,
                                                         T child,
                                                         T... children)

Prepares new locator from composition of locator with children.

Syntactic shortcut for expressions like:

locator.getChild(child1).getChild(child2)

Type Parameters:
T - the type of compoundable locator
Parameters:
locator - locator base
child - the childr of base locator
children - sub-children of base locator
Returns:
locator composition from base and its children

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.