org.jboss.test.selenium.locator
Class CssLocator

java.lang.Object
  extended by org.jboss.test.selenium.locator.AbstractLocator<T>
      extended by org.jboss.test.selenium.locator.AbstractElementLocator<CssLocator>
          extended by org.jboss.test.selenium.locator.CssLocator
All Implemented Interfaces:
CompoundableLocator<CssLocator>, ElementLocator<CssLocator>, Locator<CssLocator>

public class CssLocator
extends AbstractElementLocator<CssLocator>
implements CompoundableLocator<CssLocator>

A element locator using CSS selectors.

Can be used to compose new locators.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
CssLocator(String cssSelector)
          Initiates element locator by using CSS selectors.
 
Method Summary
 CssLocator getChild(CssLocator elementLocator)
          Gets a child of this locator by composing this locator with given elementLocator.
 CssLocator getDescendant(CssLocator elementLocator)
          Gets a descendant of this locator by composing this locator with given elementLocator.
 ElementLocationStrategy getLocationStrategy()
          Returns the location strategy for this element
 
Methods inherited from class org.jboss.test.selenium.locator.AbstractElementLocator
format, getAttribute
 
Methods inherited from class org.jboss.test.selenium.locator.AbstractLocator
getAsString, getRawLocator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.test.selenium.locator.ElementLocator
format, getAttribute
 
Methods inherited from interface org.jboss.test.selenium.locator.Locator
getAsString, getRawLocator
 

Constructor Detail

CssLocator

public CssLocator(String cssSelector)
Initiates element locator by using CSS selectors.

Parameters:
cssSelector - CSS selector
Method Detail

getLocationStrategy

public ElementLocationStrategy getLocationStrategy()
Description copied from interface: Locator
Returns the location strategy for this element

Specified by:
getLocationStrategy in interface ElementLocator<CssLocator>
Specified by:
getLocationStrategy in interface Locator<CssLocator>
Returns:
the location strategy for this element

getChild

public CssLocator getChild(CssLocator elementLocator)
Description copied from interface: CompoundableLocator
Gets a child of this locator by composing this locator with given elementLocator.

Specified by:
getChild in interface CompoundableLocator<CssLocator>
Parameters:
elementLocator - are added to this locator to compose new compount locator
Returns:
the composed locator for this locator with added elementLocator

getDescendant

public CssLocator getDescendant(CssLocator elementLocator)
Description copied from interface: CompoundableLocator
Gets a descendant of this locator by composing this locator with given elementLocator.

Specified by:
getDescendant in interface CompoundableLocator<CssLocator>
Parameters:
elementLocator - are added to this locator to compose new compound locator
Returns:
the composed locator for this locator with added elementLocator


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.