Package: geb.navigator

## [Groovy] Class NonEmptyNavigator

- geb.navigator.NonEmptyNavigator

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static def` | `BOOLEAN_ATTRIBUTES` |
    `protected static def` | `ELEMENTS_WITH_MUTABLE_VALUE` |
    `protected List<WebElement>` | `contextElements` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `NonEmptyNavigator (Browser browser, Collection<? extends WebElement> contextElements)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `Collection<WebElement>` | `allElements()`
    `Navigator` | `children()`
    `Navigator` | `children(Map<String, Object> attributes)`
    `Navigator` | `children(Map<String, Object> attributes = [:], String selector)`
    `List<String>` | `classes()`
    `Navigator` | `click()`
    `Navigator` | `click(Class<? extends Page> pageClass, Wait wait = null)`
    `Navigator` | `click(Page pageInstance, Wait wait = null)`
    `Navigator` | `click(List potentialPages, Wait wait = null)`
    `Navigator` | `closest(Map<String, Object> attributes)`
    `Navigator` | `closest(Map<String, Object> attributes = [:], String selector)`
    `protected Collection<WebElement>` | `collectChildren(Closure filter)`
    `protected List<WebElement>` | `collectElements(Closure closure)`
    `protected Collection<WebElement>` | `collectFollowingSiblings(Closure filter)`
    `protected Collection<WebElement>` | `collectParents(Closure filter)`
    `protected Collection<WebElement>` | `collectPreviousSiblings(Closure filter)`
    `protected Collection<WebElement>` | `collectRelativeElements(String xpath, Closure filter)`
    `protected Collection<WebElement>` | `collectSiblings(Closure filter)`
    `protected Collection<WebElement>` | `collectUntil(Collection<WebElement> elements, Closure matcher)`
    `protected Collection<WebElement>` | `collectUntil(Collection<WebElement> elements, String selector)`
    `protected Collection<WebElement>` | `collectUntil(Collection<WebElement> elements, Map<String, Object> attributes)`
    `protected Collection<WebElement>` | `collectUntil(Collection<WebElement> elements, Map<String, Object> attributes, String selector)`
    `String` | `css(String propertyName)`
    `protected void` | `ensureContainsSingleElement(String name, Class<?>... parameterTypes)`
    `protected void` | `ensureTagIn(List<String> allowedTags, String attribute)`
    `boolean` | `equals(Object obj)`
    `Navigator` | `filter(String selector)`
    `Navigator` | `filter(Map<String, Object> predicates)`
    `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<WebElement>` | `getElements(Range range)`
    `List<WebElement>` | `getElements(EmptyRange range)`
    `List<WebElement>` | `getElements(Collection indexes)`
    `int` | `getHeight()`
    `protected def` | `getInputValue(WebElement input)`
    `protected def` | `getInputValues(Collection<WebElement> inputs)`
    `protected def` | `getValue(WebElement input)`
    `int` | `getWidth()`
    `int` | `getX()`
    `int` | `getY()`
    `boolean` | `hasClass(String valueToContain)`
    `int` | `hashCode()`
    `Navigator` | `head()`
    `boolean` | `is(String tag)`
    `boolean` | `isDisplayed()`
    `boolean` | `isEmpty()`
    `boolean` | `isFocused()`
    `protected String` | `labelFor(WebElement input)`
    `Navigator` | `last()`
    `Navigator` | `leftShift(def value)`
    `protected boolean` | `matches(WebElement element, Map<String, Object> 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<String> actualValue, String requiredValue)`
    `protected boolean` | `matches(Collection<String> actualValue, Pattern requiredValue)`
    `protected boolean` | `matches(Collection<String> actualValue, TextMatcher matcher)`
    `def` | `methodMissing(String name, def arguments)`
    `protected Navigator` | `navigatorFor(Collection<WebElement> contextElements)`
    `Navigator` | `next()`
    `Navigator` | `next(Map<String, Object> attributes)`
    `Navigator` | `next(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `nextAll()`
    `Navigator` | `nextAll(Map<String, Object> attributes)`
    `Navigator` | `nextAll(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `nextUntil(Map<String, Object> attributes)`
    `Navigator` | `nextUntil(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `not(String selector)`
    `Navigator` | `not(Map<String, Object> predicates, String selector)`
    `Navigator` | `not(Map<String, Object> predicates)`
    `Navigator` | `parent()`
    `Navigator` | `parent(Map<String, Object> attributes)`
    `Navigator` | `parent(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `parents()`
    `Navigator` | `parents(Map<String, Object> attributes)`
    `Navigator` | `parents(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `parentsUntil(Map<String, Object> attributes)`
    `Navigator` | `parentsUntil(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `prevAll()`
    `Navigator` | `prevAll(Map<String, Object> attributes)`
    `Navigator` | `prevAll(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `prevUntil(Map<String, Object> attributes)`
    `Navigator` | `prevUntil(Map<String, Object> attributes = [:], String selector)`
    `Navigator` | `previous()`
    `Navigator` | `previous(Map<String, Object> attributes)`
    `Navigator` | `previous(Map<String, Object> attributes = [:], String selector)`
    `def` | `propertyMissing(String name)`
    `def` | `propertyMissing(String name, def value)`
    `Navigator` | `remove(int index)`
    `protected boolean` | `select(WebElement input)`
    `protected boolean` | `setCheckboxValue(WebElement input, def value)`
    `protected boolean` | `setInputValue(WebElement input, String tagName, def value, boolean suppressStaleElementException)`
    `protected void` | `setInputValues(Collection<WebElement> inputs, def value)`
    `protected def` | `setSelectValue(WebElement element, def value)`
    `Navigator` | `siblings()`
    `Navigator` | `siblings(Map<String, Object> attributes)`
    `Navigator` | `siblings(Map<String, Object> attributes = [:], String selector)`
    `WebElement` | `singleElement()`
    `int` | `size()`
    `String` | `tag()`
    `Navigator` | `tail()`
    `String` | `text()`
    `String` | `toString()`
    `Navigator` | `unique()`
    `protected boolean` | `unselect(WebElement input)`
    `def` | `value()`
    `Navigator` | `value(def value)`
    `Navigator` | `verifyNotEmpty()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractNavigator` | `$, $, $, $, $, $, $, $, $, $, $, $, $, $, $, add, add, add, add, asBoolean, attr, css, eq, filter, find, find, find, find, find, find, find, find, find, find, find, find, find, find, find, findAll, firstElement, getElement, getElements, getElements, getHeight, getJquery, getStringRepresentation, getWidth, getX, getY, has, has, has, has, has, hasNot, hasNot, hasNot, hasNot, hasNot, iterator, lastElement, module, module, moduleList, moduleList, plus, singleElement`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected static final def BOOLEAN_ATTRIBUTES

    - #### protected static final def ELEMENTS_WITH_MUTABLE_VALUE

    - #### protected final List<WebElement> contextElements

  - ### Constructor Detail

    - #### NonEmptyNavigator(Browser browser, Collection<? extends WebElement> contextElements)

  - ### Method Detail

    - #### @Override Collection<WebElement> allElements()

    - #### @Override Navigator children()

    - #### @Override Navigator children(Map<String, Object> attributes)

    - #### @Override Navigator children(Map<String, Object> attributes = [:], String selector)

    - #### @Override List<String> classes()

    - #### @Override Navigator click()

    - #### @Override Navigator click(Class<? extends Page> pageClass, Wait wait = null)

    - #### @Override Navigator click(Page pageInstance, Wait wait = null)

    - #### @Override Navigator click(List potentialPages, Wait wait = null)

    - #### @Override Navigator closest(Map<String, Object> attributes)

    - #### @Override Navigator closest(Map<String, Object> attributes = [:], String selector)

    - #### protected Collection<WebElement> collectChildren(Closure filter)

    - #### protected List<WebElement> collectElements(Closure closure)

    - #### protected Collection<WebElement> collectFollowingSiblings(Closure filter)

    - #### protected Collection<WebElement> collectParents(Closure filter)

    - #### protected Collection<WebElement> collectPreviousSiblings(Closure filter)

    - #### protected Collection<WebElement> collectRelativeElements(String xpath, Closure filter)

    - #### protected Collection<WebElement> collectSiblings(Closure filter)

    - #### protected Collection<WebElement> collectUntil(Collection<WebElement> elements, Closure matcher)

    - #### protected Collection<WebElement> collectUntil(Collection<WebElement> elements, String selector)

    - #### protected Collection<WebElement> collectUntil(Collection<WebElement> elements, Map<String, Object> attributes)

    - #### protected Collection<WebElement> collectUntil(Collection<WebElement> elements, Map<String, Object> attributes, String selector)

    - #### @Override String css(String propertyName)

    - #### protected void ensureContainsSingleElement(String name, Class<?>... parameterTypes)

    - #### protected void ensureTagIn(List<String> allowedTags, String attribute)

    - #### @Override boolean equals(Object obj)

    - #### @Override Navigator filter(String selector)

    - #### @Override Navigator filter(Map<String, Object> predicates)

    - #### @Override Navigator first()

    - #### protected WebElement firstElementInContext(Closure closure)

    - #### @Override Navigator getAt(int index)

    - #### @Override Navigator getAt(Range range)

    - #### @SuppressWarnings("UnusedMethodParameter") Navigator getAt(EmptyRange range)

    - #### @Override Navigator getAt(Collection indexes)

    - #### @Override String getAttribute(String name)

    - #### 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.

    - #### @Override WebElement getElement(int index)

    - #### @Override List<WebElement> getElements(Range range)

    - #### @SuppressWarnings("UnusedMethodParameter") List<WebElement> getElements(EmptyRange range)

    - #### @Override List<WebElement> getElements(Collection indexes)

    - #### @Override int getHeight()

    - #### protected def getInputValue(WebElement input)

    - #### protected def getInputValues(Collection<WebElement> inputs)

    - #### protected def getValue(WebElement input)

    - #### @Override int getWidth()

    - #### @Override int getX()

    - #### @Override int getY()

    - #### @Override boolean hasClass(String valueToContain)

    - #### @Override int hashCode()

    - #### @Override Navigator head()

    - #### @Override boolean is(String tag)

    - #### @Override boolean isDisplayed()

    - #### @Override boolean isEmpty()

    - #### @Override boolean isFocused()

    - #### protected String labelFor(WebElement input)

    - #### @Override Navigator last()

    - #### @Override Navigator leftShift(def value)

    - #### protected boolean matches(WebElement element, Map<String, Object> 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<String> actualValue, String requiredValue)

    - #### protected boolean matches(Collection<String> actualValue, Pattern requiredValue)

    - #### protected boolean matches(Collection<String> actualValue, TextMatcher matcher)

    - #### def methodMissing(String name, def arguments)

    - #### protected Navigator navigatorFor(Collection<WebElement> contextElements)

    - #### @Override Navigator next()

    - #### @Override Navigator next(Map<String, Object> attributes)

    - #### @Override Navigator next(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator nextAll()

    - #### @Override Navigator nextAll(Map<String, Object> attributes)

    - #### @Override Navigator nextAll(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator nextUntil(Map<String, Object> attributes)

    - #### @Override Navigator nextUntil(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator not(String selector)

    - #### @Override Navigator not(Map<String, Object> predicates, String selector)

    - #### @Override Navigator not(Map<String, Object> predicates)

    - #### @Override Navigator parent()

    - #### @Override Navigator parent(Map<String, Object> attributes)

    - #### @Override Navigator parent(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator parents()

    - #### @Override Navigator parents(Map<String, Object> attributes)

    - #### @Override Navigator parents(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator parentsUntil(Map<String, Object> attributes)

    - #### @Override Navigator parentsUntil(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator prevAll()

    - #### @Override Navigator prevAll(Map<String, Object> attributes)

    - #### @Override Navigator prevAll(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator prevUntil(Map<String, Object> attributes)

    - #### @Override Navigator prevUntil(Map<String, Object> attributes = [:], String selector)

    - #### @Override Navigator previous()

    - #### @Override Navigator previous(Map<String, Object> attributes)

    - #### @Override Navigator previous(Map<String, Object> attributes = [:], String selector)

    - #### def propertyMissing(String name)

    - #### def propertyMissing(String name, def value)

    - #### @Override Navigator remove(int index)

    - #### protected boolean select(WebElement input)

    - #### protected boolean setCheckboxValue(WebElement input, def value)

    - #### protected boolean setInputValue(WebElement input, String tagName, def value, boolean suppressStaleElementException)

    - #### protected void setInputValues(Collection<WebElement> inputs, def value)

    - #### protected def setSelectValue(WebElement element, def value)

    - #### @Override Navigator siblings()

    - #### @Override Navigator siblings(Map<String, Object> attributes)

    - #### @Override Navigator siblings(Map<String, Object> attributes = [:], String selector)

    - #### @Override WebElement singleElement()

    - #### @Override int size()

    - #### @Override String tag()

    - #### @Override Navigator tail()

    - #### @Override String text()

    - #### @Override String toString()

    - #### @Override Navigator unique()

    - #### protected boolean unselect(WebElement input)

    - #### @Override def value()

    - #### @Override Navigator value(def value)

    - #### @Override Navigator verifyNotEmpty()