Allows to create Navigators by selecting WebElements using different criteria (CSS selectors, attribute maps, indexes, ranges and By selectors).
Modifiers | Name | Description |
---|---|---|
static String |
MATCH_ALL_SELECTOR |
Type | Name and description |
---|---|
Navigator |
$(String selector) Shorthand for find(selector) |
Navigator |
$(String selector, int index) Shorthand for find(selector, index) . |
Navigator |
$(String selector, Range<Integer> range) Shorthand for find(selector, range) |
Navigator |
$(Map<String, Object> attributes, By bySelector) Shorthand for find(predicates, bySelector) |
Navigator |
$(Map<String, Object> attributes, By bySelector, int index) Shorthand for find(predicates, bySelector, index) |
Navigator |
$(Map<String, Object> attributes, By bySelector, Range<Integer> range) Shorthand for find(predicates, bySelector, range) |
Navigator |
$(By bySelector) Shorthand for find(bySelector) |
Navigator |
$(By bySelector, int index) Shorthand for find(bySelector, index) . |
Navigator |
$(By bySelector, Range<Integer> range) Shorthand for find(bySelector, range) |
Navigator |
$(Map<String, Object> attributes) Shorthand for find(predicates) |
Navigator |
$(Map<String, Object> attributes, int index) Shorthand for find(predicates, index) |
Navigator |
$(Map<String, Object> attributes, Range<Integer> range) Shorthand for find(predicates, range) |
Navigator |
$(Map<String, Object> attributes, String selector) Shorthand for find(predicates, selector) |
Navigator |
$(Map<String, Object> attributes, String selector, int index) Shorthand for find(predicates, selector, index) |
Navigator |
$(Map<String, Object> attributes, String selector, Range<Integer> range) Shorthand for find(predicates, selector, range) |
Navigator |
find(String selector) Shorthand for find(null, selector, null) |
Navigator |
find(Map<String, Object> attributes) Creates a new Navigator instance containing the elements whose attributes match the specified values or patterns. |
Navigator |
find(String selector, int index) Shorthand for find(selector)[indexOfElement] . |
Navigator |
find(String selector, Range<Integer> range) Shorthand for find(null, selector, range) |
Navigator |
find(Map<String, Object> attributes, By bySelector) Selects elements by both By selector and attributes. |
Navigator |
find(Map<String, Object> attributes, By bySelector, int index) Shorthand for find(predicates, bySelector, index..index) |
Navigator |
find(Map<String, Object> attributes, By bySelector, Range<Integer> range) Creates a new Navigator instance containing the elements matching the given By type selector. |
Navigator |
find(By bySelector, int index) Shorthand for find(bySelector)[indexOfElement] . |
Navigator |
find(By bySelector, Range<Integer> range) Shorthand for find(null, bySelector, range) |
Navigator |
find(Map<String, Object> attributes, int index) Shorthand for find(predicates, null, index..index) |
Navigator |
find(Map<String, Object> attributes, Range<Integer> range) Shorthand for find(predicates, null, range) |
Navigator |
find(Map<String, Object> attributes, String selector, int index) Shorthand for find(predicates, selector, index..index) |
Navigator |
find(Map<String, Object> attributes, String selector, Range<Integer> range) Creates a new Navigator instance containing the elements matching the given CSS selector. |
Methods inherited from class | Name |
---|---|
interface BasicLocator |
find, find |
Shorthand for find(selector)
Shorthand for find(selector, index)
.
selector
- a CSS selectorindex
- index of the required element in the selection Shorthand for find(selector, range)
selector
- The css selector Shorthand for find(predicates, bySelector)
bySelector
- a WebDriver By selectorpredicates
- a Map with keys representing attributes and values representing required values or patterns Shorthand for find(predicates, bySelector, index)
bySelector
- a WebDriver By selector Shorthand for find(predicates, bySelector, range)
bySelector
- a WebDriver By selector Shorthand for find(bySelector)
bySelector
- a WebDriver By selector Shorthand for find(bySelector, index)
.
bySelector
- a WebDriver By selectorindex
- index of the required element in the selection Shorthand for find(bySelector, range)
bySelector
- a WebDriver By selector Shorthand for find(predicates)
predicates
- a Map with keys representing attributes and values representing required values or patterns Shorthand for find(predicates, index)
Shorthand for find(predicates, range)
predicates
- attribute predicatespredicates
- range the range of matches to select Shorthand for find(predicates, selector)
selector
- a CSS selectorpredicates
- a Map with keys representing attributes and values representing required values or patterns Shorthand for find(predicates, selector, index)
Shorthand for find(predicates, selector, range)
selector
- a CSS selector Shorthand for find(null, selector, null)
Creates a new Navigator instance containing the elements whose attributes match the specified values or patterns. The key 'text' can be used to match the text contained in elements. Regular expression Pattern objects may be used as values.
Examples:
predicates
- a Map with keys representing attributes and values representing required values or patterns Shorthand for find(selector)[indexOfElement]
.
selector
- a CSS selectorindex
- index of the required element in the selection Shorthand for find(null, selector, range)
selector
- The css selector Selects elements by both By
selector and attributes. For example find(By.tagName("input"), name: "firstName")
will select
all input elements with the name "firstName".
bySelector
- a WebDriver By selectorpredicates
- a Map with keys representing attributes and values representing required values or patterns Shorthand for find(predicates, bySelector, index..index)
bySelector
- a WebDriver By selector Creates a new Navigator instance containing the elements matching the given
By
type selector. Any By
type capabilities supported by the underlying WebDriver instance are supported.
bySelector
- a WebDriver By selector Shorthand for find(bySelector)[indexOfElement]
.
bySelector
- a WebDriver By selectorindex
- index of the required element in the selection Shorthand for find(null, bySelector, range)
bySelector
- a WebDriver By selector Shorthand for find(predicates, null, index..index)
Shorthand for find(predicates, null, range)
predicates
- attribute predicatespredicates
- range the range of matches to select Shorthand for find(predicates, selector, index..index)
Creates a new Navigator instance containing the elements matching the given CSS selector. Any CSS capabilities supported by the underlying WebDriver instance are supported. If the underlying WebDriver instance does not natively support finding elements by CSS selectors then tag, id and class name selectors may be applied (in any combination).
Examples:
selector
- a CSS selectorGroovy API Documentation for Geb 2.1 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org