Groovy Documentation

geb.navigator
[Groovy] Class NonEmptyNavigator

java.lang.Object
  geb.navigator.AbstractNavigator
      geb.navigator.NonEmptyNavigator

class NonEmptyNavigator
extends AbstractNavigator

Field Summary
protected static def BOOLEAN_ATTRIBUTES

protected List contextElements

 
Constructor Summary
NonEmptyNavigator(Browser browser, Collection contextElements)

 
Method Summary
Collection allElements()

Navigator children()

Navigator children(String selectorString)

List classes()

Navigator click()

Navigator click(Class pageClass)

Navigator click(List potentialPageClasses)

Navigator closest(String selectorString)

protected List collectElements(Closure closure)

protected Collection collectUntil(Collection elements, String selectorString)

Navigator filter(String selectorString)

Navigator filter(Map predicates)

Navigator find(String selectorString)

Navigator find(Map predicates, String selector)

Navigator first()

protected WebElement firstElementInContext(Closure closure)

Navigator getAt(int index)

Navigator getAt(Range range)

Navigator getAt(EmptyRange range)

Navigator getAt(Collection indexes)

String getAttribute(String name)

protected boolean getBooleanAttribute(WebElement input, String attribute)

This works around an inconsistency in some of the WebDriver implementations.

WebElement getElement(int index)

List getElements(Range range)

List getElements(EmptyRange range)

List getElements(Collection indexes)

protected def getInputValue(WebElement input)

protected def getInputValues(Collection inputs)

protected def getValue(WebElement input)

boolean hasClass(String valueToContain)

Navigator head()

boolean is(String tag)

boolean isDisplayed()

boolean isEmpty()

protected String labelFor(WebElement input)

Navigator last()

Navigator leftShift(def value)

protected boolean matches(WebElement element, Map predicates)

protected boolean matches(String actualValue, String requiredValue)

protected boolean matches(String actualValue, Pattern requiredValue)

protected boolean matches(String actualValue, TextMatcher matcher)

protected boolean matches(Collection actualValue, String requiredValue)

protected boolean matches(Collection actualValue, Pattern requiredValue)

protected boolean matches(Collection actualValue, TextMatcher matcher)

def methodMissing(String name, def arguments)

protected Navigator navigatorFor(Collection contextElements)

Navigator next()

Navigator next(String selectorString)

Navigator nextAll()

Navigator nextAll(String selectorString)

Navigator nextUntil(String selectorString)

Navigator not(String selectorString)

Navigator not(Map predicates, String selectorString)

Navigator not(Map predicates)

protected String optimizeSelector(String selector, Map predicates)

Optimizes the selector if the predicates contains `class` or `id` keys that map to strings.

Navigator parent()

Navigator parent(String selectorString)

Navigator parents()

Navigator parents(String selectorString)

Navigator parentsUntil(String selectorString)

Navigator prevAll()

Navigator prevAll(String selectorString)

Navigator prevUntil(String selectorString)

Navigator previous()

Navigator previous(String selectorString)

def propertyMissing(String name)

def propertyMissing(String name, def value)

Navigator remove(int index)

protected void setInputValue(WebElement input, def value)

protected void setInputValues(Collection inputs, def value)

protected def setSelectValue(WebElement element, def value)

Navigator siblings()

Navigator siblings(String selectorString)

int size()

String tag()

Navigator tail()

String text()

String toString()

Navigator unique()

def value()

Navigator value(def value)

Navigator verifyNotEmpty()

 
Methods inherited from class AbstractNavigator
add, add, add, asBoolean, attr, eq, filter, find, find, find, find, find, find, findAll, firstElement, getElement, getElements, getElements, getHeight, getJquery, getWidth, getX, getY, has, has, has, isDisabled, isReadOnly, iterator, lastElement, plus
 

Field Detail

BOOLEAN_ATTRIBUTES

protected static final def BOOLEAN_ATTRIBUTES


contextElements

protected final List contextElements


 
Constructor Detail

NonEmptyNavigator

NonEmptyNavigator(Browser browser, Collection contextElements)


 
Method Detail

allElements

@Override
Collection allElements()


children

@Override
Navigator children()


children

@Override
Navigator children(String selectorString)


classes

@Override
List classes()


click

@Override
Navigator click()


click

@Override
Navigator click(Class pageClass)


click

@Override
Navigator click(List potentialPageClasses)


closest

@Override
Navigator closest(String selectorString)


collectElements

protected List collectElements(Closure closure)


collectUntil

protected Collection collectUntil(Collection elements, String selectorString)


filter

@Override
Navigator filter(String selectorString)


filter

@Override
Navigator filter(Map predicates)


find

@Override
Navigator find(String selectorString)


find

@Override
Navigator find(Map predicates, String selector)


first

@Override
Navigator first()


firstElementInContext

protected WebElement firstElementInContext(Closure closure)


getAt

@Override
Navigator getAt(int index)


getAt

@Override
Navigator getAt(Range range)


getAt

Navigator getAt(EmptyRange range)


getAt

@Override
Navigator getAt(Collection indexes)


getAttribute

@Override
String getAttribute(String name)


getBooleanAttribute

protected boolean getBooleanAttribute(WebElement input, String attribute)
This works around an inconsistency in some of the WebDriver implementations. According to the spec WebElement.getAttribute should return the Strings "true" or "false" however ChromeDriver and HtmlUnitDriver will return "" or null.


getElement

@Override
WebElement getElement(int index)


getElements

@Override
List getElements(Range range)


getElements

List getElements(EmptyRange range)


getElements

@Override
List getElements(Collection indexes)


getInputValue

protected def getInputValue(WebElement input)


getInputValues

protected def getInputValues(Collection inputs)


getValue

protected def getValue(WebElement input)


hasClass

@Override
boolean hasClass(String valueToContain)


head

@Override
Navigator head()


is

@Override
boolean is(String tag)


isDisplayed

@Override
boolean isDisplayed()


isEmpty

@Override
boolean isEmpty()


labelFor

protected String labelFor(WebElement input)


last

@Override
Navigator last()


leftShift

@Override
Navigator leftShift(def value)


matches

protected boolean matches(WebElement element, Map predicates)


matches

protected boolean matches(String actualValue, String requiredValue)


matches

protected boolean matches(String actualValue, Pattern requiredValue)


matches

protected boolean matches(String actualValue, TextMatcher matcher)


matches

protected boolean matches(Collection actualValue, String requiredValue)


matches

protected boolean matches(Collection actualValue, Pattern requiredValue)


matches

protected boolean matches(Collection actualValue, TextMatcher matcher)


methodMissing

@Override
def methodMissing(String name, def arguments)


navigatorFor

protected Navigator navigatorFor(Collection contextElements)


next

@Override
Navigator next()


next

@Override
Navigator next(String selectorString)


nextAll

@Override
Navigator nextAll()


nextAll

@Override
Navigator nextAll(String selectorString)


nextUntil

@Override
Navigator nextUntil(String selectorString)


not

@Override
Navigator not(String selectorString)


not

@Override
Navigator not(Map predicates, String selectorString)


not

@Override
Navigator not(Map predicates)


optimizeSelector

protected String optimizeSelector(String selector, Map predicates)
Optimizes the selector if the predicates contains `class` or `id` keys that map to strings. Note this method has a side-effect in that it _removes_ those keys from the predicates map.


parent

@Override
Navigator parent()


parent

@Override
Navigator parent(String selectorString)


parents

@Override
Navigator parents()


parents

@Override
Navigator parents(String selectorString)


parentsUntil

@Override
Navigator parentsUntil(String selectorString)


prevAll

@Override
Navigator prevAll()


prevAll

@Override
Navigator prevAll(String selectorString)


prevUntil

@Override
Navigator prevUntil(String selectorString)


previous

@Override
Navigator previous()


previous

@Override
Navigator previous(String selectorString)


propertyMissing

@Override
def propertyMissing(String name)


propertyMissing

def propertyMissing(String name, def value)


remove

@Override
Navigator remove(int index)


setInputValue

protected void setInputValue(WebElement input, def value)


setInputValues

protected void setInputValues(Collection inputs, def value)


setSelectValue

protected def setSelectValue(WebElement element, def value)


siblings

@Override
Navigator siblings()


siblings

@Override
Navigator siblings(String selectorString)


size

@Override
int size()


tag

@Override
String tag()


tail

@Override
Navigator tail()


text

@Override
String text()


toString

@Override
String toString()


unique

@Override
Navigator unique()


value

@Override
def value()


value

@Override
Navigator value(def value)


verifyNotEmpty

@Override
Navigator verifyNotEmpty()


 

Groovy API Documentation for Geb 0.9.1 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org