Package: geb.navigator

## [Groovy] Class SearchContextBasedBasicLocator

- geb.navigator.SearchContextBasedBasicLocator

- All Implemented Interfaces and Traits:
    BasicLocator

      class SearchContextBasedBasicLocator
      extends Object
      implements BasicLocator

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static List<String>` | `NON_SELECTOR_TRANSLATABLE_ATTRIBUTES` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SearchContextBasedBasicLocator(SearchContext searchContext, NavigatorFactory navigatorFactory)`
    `SearchContextBasedBasicLocator(Iterable<? extends SearchContext> searchContexts, NavigatorFactory navigatorFactory)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected boolean` | `dynamic(Map<String, Object> attributes)`
    `` | `protected Supplier<Collection<WebElement>>` | `elementsSupplier(By bySelector, Map<String, Object> attributes)`
    `` | `protected Supplier<Collection<WebElement>>` | `elementsSupplier(By bySelector, Map<String, Object> attributes, int index)`
    `` | `protected Supplier<Collection<WebElement>>` | `elementsSupplier(By bySelector, Map<String, Object> attributes, Range<Integer> range)`
    `` | `Navigator` | `find(By bySelector)`
    `` | `Navigator` | `find(By bySelector, int index)`
    `` | `Navigator` | `find(Map<String, Object> attributes, int index)`
    `` | `Navigator` | `find(Map<String, Object> attributes, Range<Integer> range)`
    `` | `Navigator` | `find(Map<String, Object> attributes, By bySelector, int index)`
    `` | `Navigator` | `find(Map<String, Object> attributes, By bySelector, Range<Integer> range)`
    `` | `Navigator` | `find(Map<String, Object> attributes, By bySelector)`
    `` | `Navigator` | `find(Map<String, Object> attributes, String selector)`
    `` | `Navigator` | `find(Map<String, Object> attributes, String selector, int index)`
    `` | `Navigator` | `find(Map<String, Object> attributes, String selector, Range<Integer> range)`
    `` | `protected Navigator` | `find(Map<String, Object> attributes, String selector, Closure<Navigator> navigatorFromBy)`
    `` | `protected Navigator` | `find(boolean dynamic, By bySelector, Map<String, Object> attributes)`
    `` | `protected Navigator` | `find(boolean dynamic, By bySelector, Map<String, Object> attributes, int index)`
    `` | `protected Navigator` | `find(boolean dynamic, By bySelector, Map<String, Object> attributes, Range<Integer> range)`
    `` | `protected Navigator` | `findUsingByIfPossible(Map<String, Object> attributes, String selector, Closure<Navigator> navigatorFromBy)`
    `` | `protected boolean` | `hasStringValueForKey(Map<String, Object> attributes, String key)`
    `` | `protected Navigator` | `navigatorFor(Iterable<WebElement> contextElements)`
    `` | `protected String` | `optimizeSelector(String selector, Map<String, Object> attributes)` Optimizes the selector by translating attributes map into a css attribute selector if possible.
    `` | `protected Iterable<WebElement>` | `toDynamicIterable(Supplier<Collection<WebElement>> contextElementsSupplier)`
    `` | `protected Navigator` | `toNavigator(boolean dynamic, Supplier<Collection<WebElement>> contextElementsSupplier)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### public static final List<String> NON_SELECTOR_TRANSLATABLE_ATTRIBUTES

  - ### Constructor Detail

    - #### SearchContextBasedBasicLocator(SearchContext searchContext, NavigatorFactory navigatorFactory)

    - #### SearchContextBasedBasicLocator(Iterable<? extends SearchContext> searchContexts, NavigatorFactory navigatorFactory)

  - ### Method Detail

    - #### protected boolean dynamic(Map<String, Object> attributes)

    - #### protected Supplier<Collection<WebElement>> elementsSupplier(By bySelector, Map<String, Object> attributes)

    - #### protected Supplier<Collection<WebElement>> elementsSupplier(By bySelector, Map<String, Object> attributes, int index)

    - #### protected Supplier<Collection<WebElement>> elementsSupplier(By bySelector, Map<String, Object> attributes, Range<Integer> range)

    - #### @Override
      Navigator find(By bySelector)

    - #### @Override
      Navigator find(By bySelector, int index)

    - #### @Override
      Navigator find(Map<String, Object> attributes, int index)

    - #### @Override
      Navigator find(Map<String, Object> attributes, Range<Integer> range)

    - #### @Override
      Navigator find(Map<String, Object> attributes, By bySelector, int index)

    - #### @Override
      Navigator find(Map<String, Object> attributes, By bySelector, Range<Integer> range)

    - #### @Override
      Navigator find(Map<String, Object> attributes, By bySelector)

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

    - #### @Override
      Navigator find(Map<String, Object> attributes, String selector, int index)

    - #### @Override
      Navigator find(Map<String, Object> attributes, String selector, Range<Integer> range)

    - #### protected Navigator find(Map<String, Object> attributes, String selector, @groovy.transform.stc.ClosureParams(value: FromString, options: Boolean,org.openqa.selenium.By,Map)
      Closure<Navigator> navigatorFromBy)

    - #### protected Navigator find(boolean dynamic, By bySelector, Map<String, Object> attributes)

    - #### protected Navigator find(boolean dynamic, By bySelector, Map<String, Object> attributes, int index)

    - #### protected Navigator find(boolean dynamic, By bySelector, Map<String, Object> attributes, Range<Integer> range)

    - #### protected Navigator findUsingByIfPossible(Map<String, Object> attributes, String selector, @groovy.transform.stc.ClosureParams(value: FromString, options: Boolean,org.openqa.selenium.By,Map)
      Closure<Navigator> navigatorFromBy)

    - #### protected boolean hasStringValueForKey(Map<String, Object> attributes, String key)

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

    - #### protected String optimizeSelector(String selector, Map<String, Object> attributes)

      Optimizes the selector by translating attributes map into a css attribute selector if possible. Note this method has a side-effect in that it _removes_ those keys from the predicates map.

    - #### protected Iterable<WebElement> toDynamicIterable(Supplier<Collection<WebElement>> contextElementsSupplier)

    - #### protected Navigator toNavigator(boolean dynamic, Supplier<Collection<WebElement>> contextElementsSupplier)