interface Locator extends BasicLocator
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 |
Fields inherited from class | Fields |
---|---|
interface BasicLocator |
DYNAMIC_ATTRIBUTE_NAME |
Type Params | Return Type | Name and description |
---|---|---|
|
abstract Navigator |
$(String selector) Shorthand for find(selector) |
|
abstract Navigator |
$(String selector, int index) Shorthand for find(selector, index) . |
|
abstract Navigator |
$(String selector, Range<Integer> range) Shorthand for find(selector, range) |
|
abstract Navigator |
$(Map<String, Object> attributes, By bySelector) Shorthand for find(predicates, bySelector) |
|
abstract Navigator |
$(Map<String, Object> attributes, By bySelector, int index) Shorthand for find(predicates, bySelector, index) |
|
abstract Navigator |
$(Map<String, Object> attributes, By bySelector, Range<Integer> range) Shorthand for find(predicates, bySelector, range) |
|
abstract Navigator |
$(By bySelector) Shorthand for find(bySelector) |
|
abstract Navigator |
$(By bySelector, int index) Shorthand for find(bySelector, index) . |
|
abstract Navigator |
$(By bySelector, Range<Integer> range) Shorthand for find(bySelector, range) |
|
abstract Navigator |
$(Map<String, Object> attributes) Shorthand for find(predicates) |
|
abstract Navigator |
$(Map<String, Object> attributes, int index) Shorthand for find(predicates, index) |
|
abstract Navigator |
$(Map<String, Object> attributes, Range<Integer> range) Shorthand for find(predicates, range) |
|
abstract Navigator |
$(Map<String, Object> attributes, String selector) Shorthand for find(predicates, selector) |
|
abstract Navigator |
$(Map<String, Object> attributes, String selector, int index) Shorthand for find(predicates, selector, index) |
|
abstract Navigator |
$(Map<String, Object> attributes, String selector, Range<Integer> range) Shorthand for find(predicates, selector, range) |
|
abstract Navigator |
find(String selector) Shorthand for find(null, selector, null) |
|
abstract Navigator |
find(Map<String, Object> attributes) Creates a new Navigator instance containing the elements whose attributes match the specified values or patterns. |
|
abstract Navigator |
find(String selector, int index) Shorthand for find(selector)[indexOfElement] . |
|
abstract Navigator |
find(String selector, Range<Integer> range) Shorthand for find(null, selector, range) |
|
abstract Navigator |
find(By bySelector, Range<Integer> range) Shorthand for find(null, bySelector, range) |
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 selectorGroovy API Documentation for Geb 7.0 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org