Package: geb.navigator

## [Groovy] Interface Navigator

- geb.content.StringRepresentationProvider

- All Superinterfaces:
    Locator, BasicLocator, StringRepresentationProvider

  Navigator is a jQuery-style DOM traversal tool that wraps a set of WebDriver WebElements. The code is based on the Doj library written by Kevin Wetzels: http://code.google.com/p/hue/

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `interface Locator` | `MATCH_ALL_SELECTOR`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `Navigator` | `add(String selector)`
    `Navigator` | `add(By bySelector)`
    `Navigator` | `add(WebElement[] elements)`
    `Navigator` | `add(Collection<WebElement> elements)`
    `Collection<WebElement>` | `allElements()` Returns all context elements.
    `String` | `attr(String name)` Returns the value of the given attribute of the sole context element or null for empty Navigators.
    `Navigator` | `children()` Creates a new Navigator instance containing all the child elements of the current context elements.
    `Navigator` | `children(String selector)` Creates a new Navigator instance containing all the child elements of the current context elements that match the selector.
    `Navigator` | `children(Map<String, Object> attributes)` Creates a new Navigator instance containing all the child elements of the current context elements that match the given attributes.
    `Navigator` | `children(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all the child elements of the current context elements that match the selector and given attributes.
    `List<String>` | `classes()` Returns an alphabetically sorted list of class names present on the sole context element or an empty list for empty Navigators.
    `Navigator` | `click()` Clicks on the sole context element.
    `Navigator` | `click(Class<? extends Page> pageClass)` Clicks on the sole context element, verifies the at checker (if it is defined) of the class passed as the argument and sets it as the current page.
    `Navigator` | `click(Page pageInstance)` Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page.
    `Navigator` | `click(Class<? extends Page> pageClass, Wait wait)` Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page.
    `Navigator` | `click(Page pageInstance, Wait wait)` Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page.
    `Navigator` | `click(List potentialPages)` Clicks on the sole context element, finds the first page from the list for which the at checker is defined and sets it as the current page.
    `Navigator` | `click(List potentialPages, Wait wait)` Clicks on the sole context element, finds the first page from the list for which the at checker is defined and sets it as the current page.
    `Navigator` | `closest(String selector)` Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the selector.
    `Navigator` | `closest(Map<String, Object> attributes)` Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the given attributes.
    `Navigator` | `closest(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the selector and given attributes.
    `String` | `css(String propertyName)` Gets the value of a given CSS property of the sole context element or null for empty Navigators.
    `Navigator` | `eq(int index)` Gets the wrapped element at the given index.
    `Navigator` | `filter(String selector)` Filters the set of elements represented by this Navigator to include only those that match the selector.
    `Navigator` | `filter(Map<String, Object> predicates)`
    `Navigator` | `filter(Map<String, Object> predicates, String selector)`
    `Navigator` | `findAll(Closure predicate)` Overrides the standard Groovy findAll so that the object returned is a Navigator rather than a Collection.
    `Navigator` | `first()` Creates a new Navigator instance containing only the first context element (wrapped).
    `WebElement` | `firstElement()` Returns the first context element (not wrapped).
    `Navigator` | `getAt(int index)` Gets the wrapped element at the given index.
    `Navigator` | `getAt(Range range)` Gets the wrapped elements in the given range.
    `Navigator` | `getAt(Collection indexes)` Gets the wrapped elements at the given indexes.
    `String` | `getAttribute(String name)` Returns the value of the given attribute of the sole context element or null for empty Navigators.
    `int` | `getHeight()` Returns the height of the sole element the navigator matches or 0 if it matches nothing.
    `JQueryAdapter` | `getJquery()` Returns an adapter for calling jQuery methods on the elements in this navigator.
    `String` | `getStringRepresentation()` Provides the text to be returned from `toString()` as well as to be used as part of the value returned from `toString()` if this navigator backs a template derived content element.
    `int` | `getWidth()` Returns the width of the sole element the navigator matches or 0 if it matches nothing.
    `int` | `getX()` Returns the x coordinate (from the top left corner) of the sole element the navigator matches or 0 if it matches nothing.
    `int` | `getY()` Returns the y coordinate (from the top left corner) of the sole element the navigator matches or 0 if it matches nothing.
    `Navigator` | `has(String selector)` Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the selector.
    `Navigator` | `has(Map<String, Object> predicates, String selector)` Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the selector and attributes as defined in the predicate.
    `Navigator` | `has(Map<String, Object> predicates)` Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the attributes as defined in the predicate.
    `Navigator` | `has(By bySelector)` Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the bySelector.
    `Navigator` | `has(Map<String, Object> predicates, By bySelector)` Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the bySelector and attributes as defined in the predicate.
    `boolean` | `hasClass(String className)` Returns true if the sole context element has the given class or false for empty Navigators.
    `Navigator` | `hasNot(String selector)` Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the selector.
    `Navigator` | `hasNot(Map<String, Object> predicates, String selector)` Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the selector and attributes as defined in the predicate.
    `Navigator` | `hasNot(Map<String, Object> predicates)` Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the attributes as defined in the predicate.
    `Navigator` | `hasNot(By bySelector)` Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the bySelector.
    `Navigator` | `hasNot(Map<String, Object> predicates, By bySelector)` Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the bySelector and attributes as defined in the predicate.
    `Navigator` | `head()` Creates a new Navigator instance containing only the first context element (wrapped).
    `boolean` | `is(String tag)` Returns true if the sole context element tag name matches the string passed as the argument or false for empty Navigators.
    `boolean` | `isDisplayed()` Returns true if the sole context element is displayed or false for empty Navigators.
    `boolean` | `isEmpty()` Returns true when there are no context elements.
    `boolean` | `isFocused()` Checks if the sole element of `this` navigator is focused by comparing it to the element returned from TargetLocator.activeElement.
    `Iterator<Navigator>` | `iterator()`
    `Navigator` | `last()` Creates a new Navigator instance containing only the last context element (wrapped).
    `WebElement` | `lastElement()` Returns the last context element (not wrapped).
    `Navigator` | `leftShift(def value)`
    `T` | `module(Class<T> moduleClass)` Create and initialize an instance of the given module class, using `this` as its base.
    `T` | `module(T module)` Initialize a module instance using `this` as its base.
    `List<T>` | `moduleList(Class<T> moduleClass)` Create and initialize a list of module instances using navigators created from web elements which make up `this` navigator as their bases.
    `List<T>` | `moduleList(Closure<T> moduleFactory)` Create a list of module instances using the provided factory and initialize them using navigators created from web elements which make up `this` navigator as their bases.
    `Navigator` | `next()` Creates a new Navigator instance containing the next sibling elements of the current context elements.
    `Navigator` | `next(String selector)` Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the selector.
    `Navigator` | `next(Map<String, Object> attributes)` Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the given attributes.
    `Navigator` | `next(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the selector and given attributes.
    `Navigator` | `nextAll()` Creates a new Navigator instance containing all following sibling elements of the current context elements.
    `Navigator` | `nextAll(String selector)` Creates a new Navigator instance containing all following sibling elements of the current context elements that match the selector.
    `Navigator` | `nextAll(Map<String, Object> attributes)` Creates a new Navigator instance containing all following sibling elements of the current context elements, matching the given attributes.
    `Navigator` | `nextAll(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all following sibling elements of the current context elements, matching the selector and given attributes.
    `Navigator` | `nextUntil(String selector)` Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the selector.
    `Navigator` | `nextUntil(Map<String, Object> attributes)` Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the given attributes.
    `Navigator` | `nextUntil(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the selector and given attributes.
    `Navigator` | `not(String selector)` Returns a new Navigator instance containing all elements of the current Navigator that do not match the selector.
    `Navigator` | `not(Map<String, Object> predicates, String selector)` Returns a new Navigator instance containing all elements of the current Navigator that do not match the selector and attributes as defined in the predicate.
    `Navigator` | `not(Map<String, Object> predicates)` Returns a new Navigator instance containing all elements of the current Navigator that do not match the attributes as defined in the predicate.
    `Navigator` | `parent()` Creates a new Navigator instance containing the direct parent elements of the current context elements.
    `Navigator` | `parent(String selector)` Creates a new Navigator instance containing the direct parent elements of the current context elements that match the selector.
    `Navigator` | `parent(Map<String, Object> attributes)` Creates a new Navigator instance containing the direct parent elements of the current context elements that match the given attributes.
    `Navigator` | `parent(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing the direct parent elements of the current context elements that match the selector and given attributes.
    `Navigator` | `parents()` Creates a new Navigator instance containing all the ancestor elements of the current context elements.
    `Navigator` | `parents(String selector)` Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the selector.
    `Navigator` | `parents(Map<String, Object> attributes)` Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the given attributes.
    `Navigator` | `parents(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the given attributes.
    `Navigator` | `parentsUntil(String selector)` Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the selector.
    `Navigator` | `parentsUntil(Map<String, Object> attributes)` Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the given attributes.
    `Navigator` | `parentsUntil(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the selector and given attributes.
    `Navigator` | `plus(Navigator navigator)` Merges the Navigator instance with the current instance to create a new Navigator instance containing the context elements of both.
    `Navigator` | `prevAll()` Creates a new Navigator instance containing all preceding sibling elements of the current context elements.
    `Navigator` | `prevAll(String selector)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the selector.
    `Navigator` | `prevAll(Map<String, Object> attributes)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the given attributes.
    `Navigator` | `prevAll(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the selector and given attributes.
    `Navigator` | `prevUntil(String selector)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the selector.
    `Navigator` | `prevUntil(Map<String, Object> attributes)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the given attributes.
    `Navigator` | `prevUntil(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the selector and given attributes.
    `Navigator` | `previous()` Creates a new Navigator instance containing the previous sibling elements of the current context elements.
    `Navigator` | `previous(String selector)` Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the selector.
    `Navigator` | `previous(Map<String, Object> attributes)` Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the given attributes.
    `Navigator` | `previous(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the selector and given attributes.
    `Navigator` | `remove(int index)` Creates a new Navigator instance by removing the element at the given index from the context.
    `Navigator` | `siblings()` Creates a new Navigator instance containing all the sibling elements of the current context elements.
    `Navigator` | `siblings(String selector)` Creates a new Navigator instance containing all the sibling elements of the current context elements that match the selector.
    `Navigator` | `siblings(Map<String, Object> attributes)` Creates a new Navigator instance containing all the sibling elements of the current context elements that match the given attributes.
    `Navigator` | `siblings(Map<String, Object> attributes, String selector)` Creates a new Navigator instance containing all the sibling elements of the current context elements that match the selector and given attributes.
    `WebElement` | `singleElement()` Returns the sole context element (not wrapped).
    `int` | `size()` Returns the number of context elements.
    `String` | `tag()` Returns the tag name of the sole context element or null for empty Navigators.
    `Navigator` | `tail()` Creates a new Navigator instance containing all but the first context element (wrapped).
    `String` | `text()` Returns the visible (i.e. not hidden by CSS) inner text content of the sole context element and its sub-elements or null for empty Navigators.
    `Navigator` | `unique()` Creates a new Navigator instance containing all elements of this instance with duplicate elements removed
    `def` | `value()` Returns the value of the sole context element for input elements (including textarea, select and button) or null for empty Navigators.
    `Navigator` | `value(def value)` Sets the value of the form input elements to the given value.
    `Navigator` | `verifyNotEmpty()` Throws an exception when the Navigator instance is empty.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Iterable` | `iterator, spliterator, forEach`
    `interface Locator` | `$, $, $, $, $, $, $, $, $, $, $, $, $, $, $, find, find, find, find, find, find, find, find, find, find, find, find, find`
    `interface StringRepresentationProvider` | `getStringRepresentation`

- - ### Method Detail

    - #### Navigator add(String selector)

    - #### Navigator add(By bySelector)

    - #### Navigator add(WebElement[] elements)

    - #### Navigator add(Collection<WebElement> elements)

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

      Returns all context elements.

      Returns:
        all context elements

    - #### String attr(String name)

      Returns the value of the given attribute of the sole context element or null for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        the value of the given attribute of the sole context element
      Parameters:
        `name` - name of the attribute

    - #### Navigator children()

      Creates a new Navigator instance containing all the child elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator children(String selector)

      Creates a new Navigator instance containing all the child elements of the current context elements that match the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all the child elements of the current context elements that match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all the child elements of the current context elements that match the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

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

      Returns an alphabetically sorted list of class names present on the sole context element or an empty list for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        an alphabetically sorted list of class names present on the sole context element

    - #### Navigator click()

      Clicks on the sole context element. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator

    - #### Navigator click(Class<? extends Page> pageClass)

      Clicks on the sole context element, verifies the at checker (if it is defined) of the class passed as the argument and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `pageClass` - page class to be used as the new current page after clicking the element

    - #### Navigator click(Page pageInstance)

      Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `pageInstance` - page instance to be used as the new current page after clicking the element

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

      Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `pageClass` - page class to be used as the new current page after clicking the element
        `wait` - configuration to be used for waiting for the at checker to succeed

    - #### Navigator click(Page pageInstance, Wait wait)

      Clicks on the sole context element, verifies the at checker (if it is defined) of the instance passed as the argument and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `pageInstance` - page instance to be used as the new current page after clicking the element
        `wait` - configuration to be used for waiting for the at checker to succeed

    - #### Navigator click(List potentialPages)

      Clicks on the sole context element, finds the first page from the list for which the at checker is defined and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `potentialPages` - a list of classes extending Page or a list of instances of such classes

    - #### Navigator click(List potentialPages, Wait wait)

      Clicks on the sole context element, finds the first page from the list for which the at checker is defined and sets it as the current page. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        this
      Parameters:
        `potentialPages` - a list of classes extending Page or a list of instances of such classes
        `wait` - configuration to be used for waiting for the at checkers to succeed

    - #### Navigator closest(String selector)

      Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the selector.

      Unlike parent(), this method will keep traversing up the DOM until a match is found or the top of the DOM has been found

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the given attributes.

      Unlike parent(), this method will keep traversing up the DOM until a match is found or the top of the DOM has been found

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing the first ancestor element of each of the current context elements that match the selector and given attributes.

      Unlike parent(), this method will keep traversing up the DOM until a match is found or the top of the DOM has been found

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match
        `attributes` - to match

    - #### String css(String propertyName)

      Gets the value of a given CSS property of the sole context element or null for empty Navigators. Cannot be called on multi element Navigators.

      Color values should be returned as rgba strings, so, for example if the "background-color" property is set as "green" in the HTML source, the returned value will be "rgba(0, 255, 0, 1)". Note that shorthand CSS properties (e.g. background, font, border, border-top, margin, margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned, in accordance with the DOM CSS2 specification - you should directly access the longhand properties (e.g. background-color) to access the desired values.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        The current, computed value of the property or null if the is not specified.
      Parameters:
        propertyName

    - #### Navigator eq(int index)

      Gets the wrapped element at the given index.

      When no such element exists, an empty Navigator instance is returned.

      Returns:
        new Navigator instance
      Parameters:
        `index` - index of the element to retrieve - pass a negative value to start from the back

    - #### Navigator filter(String selector)

      Filters the set of elements represented by this Navigator to include only those that match the selector.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector

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

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

    - #### Navigator findAll(Closure predicate)

      Overrides the standard Groovy findAll so that the object returned is a Navigator rather than a Collection.

    - #### Navigator first()

      Creates a new Navigator instance containing only the first context element (wrapped).

      Returns:
        new Navigator instance

    - #### WebElement firstElement()

      Returns the first context element (not wrapped).

      Returns:
        the first context element (not wrapped)

    - #### Navigator getAt(int index)

      Gets the wrapped element at the given index.

      When no such element exists, an empty Navigator instance is returned.

      Returns:
        new Navigator instance
      Parameters:
        `index` - index of the element to retrieve - pass a negative value to start from the back

    - #### Navigator getAt(Range range)

      Gets the wrapped elements in the given range.

      When no such elements exist, an empty Navigator instance is returned.

      Returns:
        new Navigator instance
      Parameters:
        `range` - range of the elements to retrieve

    - #### Navigator getAt(Collection indexes)

      Gets the wrapped elements at the given indexes.

      When no such elements exist, an empty Navigator instance is returned.

      Returns:
        new Navigator instance
      Parameters:
        `indexes` - indexes of the elements to retrieve

    - #### String getAttribute(String name)

      Returns the value of the given attribute of the sole context element or null for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        the value of the given attribute of the sole context element
      Parameters:
        `name` - name of the attribute

    - #### int getHeight()

      Returns the height of the sole element the navigator matches or 0 if it matches nothing. Cannot be called on multi element Navigators.

      To get the height of all matched elements you can use the spread operator `navigator*.height`

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator

    - #### JQueryAdapter getJquery()

      Returns an adapter for calling jQuery methods on the elements in this navigator.

    - #### String getStringRepresentation()

      Provides the text to be returned from `toString()` as well as to be used as part of the value returned from `toString()` if this navigator backs a template derived content element.

    - #### int getWidth()

      Returns the width of the sole element the navigator matches or 0 if it matches nothing. Cannot be called on multi element Navigators.

      To get the width of all matched elements you can use the spread operator `navigator*.width`

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator

    - #### int getX()

      Returns the x coordinate (from the top left corner) of the sole element the navigator matches or 0 if it matches nothing. Cannot be called on multi element Navigators.

      To get the x coordinate of all matched elements you can use the spread operator `navigator*.x`

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator

    - #### int getY()

      Returns the y coordinate (from the top left corner) of the sole element the navigator matches or 0 if it matches nothing. Cannot be called on multi element Navigators.

      To get the y coordinate of all matched elements you can use the spread operator `navigator*.y`

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator

    - #### Navigator has(String selector)

      Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the selector.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector

    - #### Navigator has(Map<String, Object> predicates, String selector)

      Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the selector and attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector
        `predicates` - a Map with keys representing attributes and values representing required values or patterns

    - #### Navigator has(Map<String, Object> predicates)

      Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `predicates` - a Map with keys representing attributes and values representing required values or patterns

    - #### Navigator has(By bySelector)

      Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the bySelector.

      Returns:
        a new Navigator instance
      Parameters:
        `bySelector` - a WebDriver By selector

    - #### Navigator has(Map<String, Object> predicates, By bySelector)

      Filters the set of elements represented by this Navigator to include only that have one or more descendants that match the bySelector and attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `bySelector` - a WebDriver By selector
        `predicates` - a Map with keys representing attributes and values representing required values or patterns

    - #### boolean hasClass(String className)

      Returns true if the sole context element has the given class or false for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        true if the sole context element has the given class
      Parameters:
        `className` - class to check for

    - #### Navigator hasNot(String selector)

      Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the selector.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector

    - #### Navigator hasNot(Map<String, Object> predicates, String selector)

      Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the selector and attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector
        `predicates` - a Map with keys representing attributes and values representing excluded values or patterns

    - #### Navigator hasNot(Map<String, Object> predicates)

      Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `predicates` - a Map with keys representing attributes and values representing excluded values or patterns

    - #### Navigator hasNot(By bySelector)

      Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the bySelector.

      Returns:
        a new Navigator instance
      Parameters:
        `bySelector` - a WebDriver By selector

    - #### Navigator hasNot(Map<String, Object> predicates, By bySelector)

      Filters the set of elements represented by this Navigator to exclude that have one or more descendants that match the bySelector and attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `bySelector` - a WebDriver By selector
        `predicates` - a Map with keys representing attributes and values representing required values or patterns

    - #### Navigator head()

      Creates a new Navigator instance containing only the first context element (wrapped).

      Returns:
        new Navigator instance

    - #### boolean is(String tag)

      Returns true if the sole context element tag name matches the string passed as the argument or false for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        true if at least one of the context elements matches the tag
      Parameters:
        `tag` - tag name to match

    - #### boolean isDisplayed()

      Returns true if the sole context element is displayed or false for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        true if the first element is displayed

    - #### boolean isEmpty()

      Returns true when there are no context elements.

      Returns:
        true when there are no context elements

    - #### boolean isFocused()

      Checks if the sole element of `this` navigator is focused by comparing it to the element returned from TargetLocator.activeElement. If the navigator is empty `false` will be returned. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        `true` if the first element is focused

    - #### Iterator<Navigator> iterator()

    - #### Navigator last()

      Creates a new Navigator instance containing only the last context element (wrapped).

      Returns:
        new Navigator instance

    - #### WebElement lastElement()

      Returns the last context element (not wrapped).

      Returns:
        the last context element (not wrapped)

    - #### Navigator leftShift(def value)

    - #### @SuppressWarnings('UnnecessaryPublicModifier') T module(Class<T> moduleClass)

      Create and initialize an instance of the given module class, using `this` as its base.

      Returns:
        an initialized instance of the module class passed as the argument
      Parameters:
        `moduleClass` - a class extending Module

    - #### @SuppressWarnings('UnnecessaryPublicModifier') T module(T module)

      Initialize a module instance using `this` as its base.

      Returns:
        an initialized instance of passed as the argument
      Parameters:
        `module` - an instance of a class extending Module

    - #### @SuppressWarnings('UnnecessaryPublicModifier') List<T> moduleList(Class<T> moduleClass)

      Create and initialize a list of module instances using navigators created from web elements which make up `this` navigator as their bases.

      Returns:
        a list of initialized instances of the module class passed as the argument
      Parameters:
        `moduleClass` - a class extending Module

    - #### @SuppressWarnings('UnnecessaryPublicModifier') List<T> moduleList(Closure<T> moduleFactory)

      Create a list of module instances using the provided factory and initialize them using navigators created from web elements which make up `this` navigator as their bases.

      Returns:
        a list of initialized module instances created using the factory closure passed in as the argument
      Parameters:
        `moduleFactory` - a closure that should return a new module instance every time it's called

    - #### Navigator next()

      Creates a new Navigator instance containing the next sibling elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator next(String selector)

      Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the selector.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the given attributes.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing the next sibling elements of the current context elements, matching the selector and given attributes.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator nextAll()

      Creates a new Navigator instance containing all following sibling elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator nextAll(String selector)

      Creates a new Navigator instance containing all following sibling elements of the current context elements that match the selector.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all following sibling elements of the current context elements, matching the given attributes.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all following sibling elements of the current context elements, matching the selector and given attributes.

      Unlike next(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator nextUntil(String selector)

      Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all following sibling elements of the current context elements up to, but not including, the first to match the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator not(String selector)

      Returns a new Navigator instance containing all elements of the current Navigator that do not match the selector.

      Returns:
        a new Navigator instance
      Parameters:
        `selector` - a CSS selector

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

      Returns a new Navigator instance containing all elements of the current Navigator that do not match the selector and attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `predicates` - a Map with keys representing attributes and values representing required values or patterns
        `selector` - a CSS selector

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

      Returns a new Navigator instance containing all elements of the current Navigator that do not match the attributes as defined in the predicate.

      Returns:
        a new Navigator instance
      Parameters:
        `predicates` - a Map with keys representing attributes and values representing required values or patterns

    - #### Navigator parent()

      Creates a new Navigator instance containing the direct parent elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator parent(String selector)

      Creates a new Navigator instance containing the direct parent elements of the current context elements that match the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing the direct parent elements of the current context elements that match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing the direct parent elements of the current context elements that match the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator parents()

      Creates a new Navigator instance containing all the ancestor elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator parents(String selector)

      Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all the ancestor elements of the current context elements that match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator parentsUntil(String selector)

      Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all the ancestor elements of the current context elements up to but not including the first that matches the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator plus(Navigator navigator)

      Merges the Navigator instance with the current instance to create a new Navigator instance containing the context elements of both.

      Returns:
        new Navigator instance
      Parameters:
        `navigator` - navigator to merge with this one

    - #### Navigator prevAll()

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator prevAll(String selector)

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements, matching the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match
        `attributes` - to match

    - #### Navigator prevUntil(String selector)

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all preceding sibling elements of the current context elements up to, but not including the first matching the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator previous()

      Creates a new Navigator instance containing the previous sibling elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator previous(String selector)

      Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the selector.

      Unlike previous(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the given attributes.

      Unlike previous(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing the previous sibling elements of the current context elements, matching the selector and given attributes.

      Unlike previous(), this method will keep looking for the first matching sibling until it finds a match or is out of siblings.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### Navigator remove(int index)

      Creates a new Navigator instance by removing the element at the given index from the context.

      If no such element exists, the current instance is returned.

      Returns:
        new Navigator instance
      Parameters:
        `index` - index of the element to remove - pass a negative value to start from the back

    - #### Navigator siblings()

      Creates a new Navigator instance containing all the sibling elements of the current context elements.

      Returns:
        new Navigator instance

    - #### Navigator siblings(String selector)

      Creates a new Navigator instance containing all the sibling elements of the current context elements that match the selector.

      Returns:
        new Navigator instance
      Parameters:
        `selector` - to match

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

      Creates a new Navigator instance containing all the sibling elements of the current context elements that match the given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match

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

      Creates a new Navigator instance containing all the sibling elements of the current context elements that match the selector and given attributes.

      Returns:
        new Navigator instance
      Parameters:
        `attributes` - to match
        `selector` - to match

    - #### WebElement singleElement()

      Returns the sole context element (not wrapped). Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        the sole context element (not wrapped)

    - #### int size()

      Returns the number of context elements.

      Returns:
        the number of context elements

    - #### String tag()

      Returns the tag name of the sole context element or null for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        the tag name of the sole context element

    - #### Navigator tail()

      Creates a new Navigator instance containing all but the first context element (wrapped).

      Returns:
        new Navigator instance

    - #### String text()

      Returns the visible (i.e. not hidden by CSS) inner text content of the sole context element and its sub-elements or null for empty Navigators. Cannot be called on multi element Navigators.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        the text content of the sole context element

    - #### Navigator unique()

      Creates a new Navigator instance containing all elements of this instance with duplicate elements removed

    - #### def value()

      Returns the value of the sole context element for input elements (including textarea, select and button) or null for empty Navigators. Cannot be called on multi element Navigators.

      In the case of a select, the value of the selected option or a list of selected options is returned.

      throws:
        geb.error.SingleElementNavigatorOnlyMethodException when called on a multi element navigator
      Returns:
        value of the sole context element

    - #### Navigator value(def value)

      Sets the value of the form input elements to the given value.

      Returns:
        current Navigator instance
      Parameters:
        `value` - value to use

    - #### Navigator verifyNotEmpty()

      Throws an exception when the Navigator instance is empty.

      Returns:
        the current Navigator instance