Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.locator
Class LocatorFactory

java.lang.Object
  extended by org.jboss.arquillian.ajocado.locator.LocatorFactory

public final class LocatorFactory
extends Object

Utility class simplifying creation of locators of various types providing it's factories.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
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 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 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
 

Method Detail

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

Graphene Implementation 1.0.0.CR3

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