Liking cljdoc? Tell your friends :D

com.blockether.spel.locator

Locator and ElementHandle operations.

Locators are the primary way to find and interact with elements. They auto-wait and auto-retry, making them the preferred API.

Locator and ElementHandle operations.

Locators are the primary way to find and interact with elements.
They auto-wait and auto-retry, making them the preferred API.
raw docstring

allclj

(all loc)

Returns all elements matching the locator as individual locators.

Params: loc - Locator instance.

Returns: Vector of Locator instances.

Returns all elements matching the locator as individual locators.

Params:
`loc` - Locator instance.

Returns:
Vector of Locator instances.
sourceraw docstring

all-inner-textsclj

(all-inner-texts loc)

Returns all inner texts for matching elements.

Params: loc - Locator instance.

Returns: Vector of strings.

Returns all inner texts for matching elements.

Params:
`loc` - Locator instance.

Returns:
Vector of strings.
sourceraw docstring

all-text-contentsclj

(all-text-contents loc)

Returns all text contents for matching elements.

Params: loc - Locator instance.

Returns: Vector of strings.

Returns all text contents for matching elements.

Params:
`loc` - Locator instance.

Returns:
Vector of strings.
sourceraw docstring

blurclj

(blur loc)

Blurs (removes focus from) the element.

Params: loc - Locator instance.

Returns: nil or anomaly map on failure.

Blurs (removes focus from) the element.

Params:
`loc` - Locator instance.

Returns:
nil or anomaly map on failure.
sourceraw docstring

bounding-boxclj

(bounding-box loc)

Returns the bounding box of the element.

Params: loc - Locator instance.

Returns: Map with :x :y :width :height or nil.

Returns the bounding box of the element.

Params:
`loc` - Locator instance.

Returns:
Map with :x :y :width :height or nil.
sourceraw docstring

checkclj

(check loc)
(check loc check-opts)

Checks a checkbox or radio button.

Params: loc - Locator instance. opts - Map, optional. Check options.

Returns: nil or anomaly map on failure.

Checks a checkbox or radio button.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Check options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

clearclj

(clear loc)

Clears input field content.

Params: loc - Locator instance.

Returns: nil or anomaly map on failure.

Clears input field content.

Params:
`loc` - Locator instance.

Returns:
nil or anomaly map on failure.
sourceraw docstring

clickclj

(click loc)
(click loc click-opts)

Clicks an element.

Params: loc - Locator instance. opts - Map, optional. Click options.

Returns: nil or anomaly map on failure.

Clicks an element.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Click options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

content-frameclj

(content-frame loc)

Returns a FrameLocator pointing to the same iframe as this locator. Use when the locator points to an iframe element and you need to interact with elements inside the frame.

Params: loc - Locator instance pointing to an iframe element.

Returns: FrameLocator instance.

Returns a FrameLocator pointing to the same iframe as this locator.
Use when the locator points to an iframe element and you need to
interact with elements inside the frame.

Params:
`loc` - Locator instance pointing to an iframe element.

Returns:
FrameLocator instance.
sourceraw docstring

count-elementsclj

(count-elements loc)

Returns the number of elements matching the locator.

Params: loc - Locator instance.

Returns: Long.

Returns the number of elements matching the locator.

Params:
`loc` - Locator instance.

Returns:
Long.
sourceraw docstring

dblclickclj

(dblclick loc)
(dblclick loc dblclick-opts)

Double-clicks an element.

Params: loc - Locator instance. opts - Map, optional. Double-click options.

Returns: nil or anomaly map on failure.

Double-clicks an element.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Double-click options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

dispatch-eventclj

(dispatch-event loc type)

Dispatches a DOM event on the element.

Params: loc - Locator instance. type - String. Event type (e.g. "click").

Returns: nil or anomaly map.

Dispatches a DOM event on the element.

Params:
`loc`  - Locator instance.
`type` - String. Event type (e.g. "click").

Returns:
nil or anomaly map.
sourceraw docstring

drag-toclj

(drag-to loc target)

Drags this locator to another locator.

Params: loc - Locator instance (source). target - Locator instance (target).

Returns: nil or anomaly map.

Drags this locator to another locator.

Params:
`loc`    - Locator instance (source).
`target` - Locator instance (target).

Returns:
nil or anomaly map.
sourceraw docstring

eh-bounding-boxclj

(eh-bounding-box eh)

Returns the bounding box of the element handle.

Returns the bounding box of the element handle.
sourceraw docstring

eh-clickclj

(eh-click eh)
(eh-click eh click-opts)

Clicks an element handle.

Params: eh - ElementHandle instance. opts - Map, optional. Click options.

Clicks an element handle.

Params:
`eh`   - ElementHandle instance.
`opts` - Map, optional. Click options.
sourceraw docstring

eh-dispose!clj

(eh-dispose! eh)

Disposes the element handle.

Params: eh - ElementHandle instance.

Disposes the element handle.

Params:
`eh` - ElementHandle instance.
sourceraw docstring

eh-fillclj

(eh-fill eh value)

Fills text into an element handle.

Params: eh - ElementHandle instance. value - String.

Fills text into an element handle.

Params:
`eh`    - ElementHandle instance.
`value` - String.
sourceraw docstring

eh-get-attributeclj

(eh-get-attribute eh name)

Returns an attribute value of the element handle.

Params: eh - ElementHandle instance. name - String. Attribute name.

Returns: String or nil.

Returns an attribute value of the element handle.

Params:
`eh`   - ElementHandle instance.
`name` - String. Attribute name.

Returns:
String or nil.
sourceraw docstring

eh-inner-htmlclj

(eh-inner-html eh)

Returns inner HTML of an element handle.

Params: eh - ElementHandle instance.

Returns: String.

Returns inner HTML of an element handle.

Params:
`eh` - ElementHandle instance.

Returns:
String.
sourceraw docstring

eh-inner-textclj

(eh-inner-text eh)

Returns inner text of an element handle.

Params: eh - ElementHandle instance.

Returns: String.

Returns inner text of an element handle.

Params:
`eh` - ElementHandle instance.

Returns:
String.
sourceraw docstring

eh-is-checked?clj

(eh-is-checked? eh)

Returns whether the element handle is checked.

Returns whether the element handle is checked.
sourceraw docstring

eh-is-enabled?clj

(eh-is-enabled? eh)

Returns whether the element handle is enabled.

Returns whether the element handle is enabled.
sourceraw docstring

eh-is-visible?clj

(eh-is-visible? eh)

Returns whether the element handle is visible.

Returns whether the element handle is visible.
sourceraw docstring

eh-screenshotclj

(eh-screenshot eh)
(eh-screenshot eh screenshot-opts)

Takes a screenshot of the element.

Takes a screenshot of the element.
sourceraw docstring

eh-text-contentclj

(eh-text-content eh)

Returns text content of an element handle.

Params: eh - ElementHandle instance.

Returns: String or nil.

Returns text content of an element handle.

Params:
`eh` - ElementHandle instance.

Returns:
String or nil.
sourceraw docstring

element-handleclj

(element-handle loc)

Returns the ElementHandle for the first matching element.

Params: loc - Locator instance.

Returns: ElementHandle or anomaly map.

Returns the ElementHandle for the first matching element.

Params:
`loc` - Locator instance.

Returns:
ElementHandle or anomaly map.
sourceraw docstring

element-handlesclj

(element-handles loc)

Returns all ElementHandles matching the locator.

Params: loc - Locator instance.

Returns: Vector of ElementHandle.

Returns all ElementHandles matching the locator.

Params:
`loc` - Locator instance.

Returns:
Vector of ElementHandle.
sourceraw docstring

evaluate-allclj

(evaluate-all loc expression)
(evaluate-all loc expression arg)

Evaluates JavaScript on all elements matching the locator.

Params: loc - Locator instance. expression - String. JavaScript expression.

Returns: Result or anomaly map.

Evaluates JavaScript on all elements matching the locator.

Params:
`loc`        - Locator instance.
`expression` - String. JavaScript expression.

Returns:
Result or anomaly map.
sourceraw docstring

evaluate-locatorclj

(evaluate-locator loc expression)
(evaluate-locator loc expression arg)

Evaluates JavaScript on the element found by this locator.

Params: loc - Locator instance. expression - String. JavaScript expression. arg - Optional argument.

Returns: Result or anomaly map.

Evaluates JavaScript on the element found by this locator.

Params:
`loc`        - Locator instance.
`expression` - String. JavaScript expression.
`arg`        - Optional argument.

Returns:
Result or anomaly map.
sourceraw docstring

fillclj

(fill loc value)
(fill loc value fill-opts)

Fills an input element with text.

Params: loc - Locator instance. value - String. Text to fill. opts - Map, optional. Fill options.

Returns: nil or anomaly map on failure.

Fills an input element with text.

Params:
`loc`   - Locator instance.
`value` - String. Text to fill.
`opts`  - Map, optional. Fill options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

first-elementclj

(first-element loc)

Returns the first element matching the locator.

Params: loc - Locator instance.

Returns: Locator for the first element.

Returns the first element matching the locator.

Params:
`loc` - Locator instance.

Returns:
Locator for the first element.
sourceraw docstring

focusclj

(focus loc)

Focuses the element.

Params: loc - Locator instance.

Returns: nil or anomaly map on failure.

Focuses the element.

Params:
`loc` - Locator instance.

Returns:
nil or anomaly map on failure.
sourceraw docstring

get-attributeclj

(get-attribute loc name)

Returns the value of an attribute.

Params: loc - Locator instance. name - String. Attribute name.

Returns: String or nil, or anomaly map.

Returns the value of an attribute.

Params:
`loc`  - Locator instance.
`name` - String. Attribute name.

Returns:
String or nil, or anomaly map.
sourceraw docstring

highlightclj

(highlight loc)

Highlights the element for debugging.

Params: loc - Locator instance.

Highlights the element for debugging.

Params:
`loc` - Locator instance.
sourceraw docstring

hoverclj

(hover loc)
(hover loc hover-opts)

Hovers over an element.

Params: loc - Locator instance. opts - Map, optional. Hover options.

Returns: nil or anomaly map on failure.

Hovers over an element.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Hover options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

inner-htmlclj

(inner-html loc)

Returns the inner HTML of the element.

Params: loc - Locator instance.

Returns: String, or anomaly map.

Returns the inner HTML of the element.

Params:
`loc` - Locator instance.

Returns:
String, or anomaly map.
sourceraw docstring

inner-textclj

(inner-text loc)

Returns the inner text of the element.

Params: loc - Locator instance.

Returns: String, or anomaly map.

Returns the inner text of the element.

Params:
`loc` - Locator instance.

Returns:
String, or anomaly map.
sourceraw docstring

input-valueclj

(input-value loc)

Returns the input value of an input element.

Params: loc - Locator instance.

Returns: String, or anomaly map.

Returns the input value of an input element.

Params:
`loc` - Locator instance.

Returns:
String, or anomaly map.
sourceraw docstring

is-checked?clj

(is-checked? loc)

Returns whether the element is checked.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is checked.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

is-disabled?clj

(is-disabled? loc)

Returns whether the element is disabled.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is disabled.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

is-editable?clj

(is-editable? loc)

Returns whether the element is editable.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is editable.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

is-enabled?clj

(is-enabled? loc)

Returns whether the element is enabled.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is enabled.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

is-hidden?clj

(is-hidden? loc)

Returns whether the element is hidden.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is hidden.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

is-visible?clj

(is-visible? loc)

Returns whether the element is visible.

Params: loc - Locator instance.

Returns: Boolean.

Returns whether the element is visible.

Params:
`loc` - Locator instance.

Returns:
Boolean.
sourceraw docstring

js-as-elementclj

(js-as-element handle)

Casts a JSHandle to ElementHandle if possible.

Params: handle - JSHandle instance.

Returns: ElementHandle or nil.

Casts a JSHandle to ElementHandle if possible.

Params:
`handle` - JSHandle instance.

Returns:
ElementHandle or nil.
sourceraw docstring

js-dispose!clj

(js-dispose! handle)

Disposes the JSHandle.

Params: handle - JSHandle instance.

Disposes the JSHandle.

Params:
`handle` - JSHandle instance.
sourceraw docstring

js-evaluateclj

(js-evaluate handle expression)
(js-evaluate handle expression arg)

Evaluates JavaScript on a JSHandle.

Params: handle - JSHandle instance. expression - String. JavaScript expression.

Returns: Result or anomaly map.

Evaluates JavaScript on a JSHandle.

Params:
`handle`     - JSHandle instance.
`expression` - String. JavaScript expression.

Returns:
Result or anomaly map.
sourceraw docstring

js-get-propertiesclj

(js-get-properties handle)

Gets all properties of a JSHandle.

Params: handle - JSHandle instance.

Returns: Map of property name to JSHandle.

Gets all properties of a JSHandle.

Params:
`handle` - JSHandle instance.

Returns:
Map of property name to JSHandle.
sourceraw docstring

js-get-propertyclj

(js-get-property handle name)

Gets a property of a JSHandle.

Params: handle - JSHandle instance. name - String. Property name.

Returns: JSHandle for the property.

Gets a property of a JSHandle.

Params:
`handle` - JSHandle instance.
`name`   - String. Property name.

Returns:
JSHandle for the property.
sourceraw docstring

js-json-valueclj

(js-json-value handle)

Returns the JSON value of a JSHandle.

Params: handle - JSHandle instance.

Returns: Parsed JSON value.

Returns the JSON value of a JSHandle.

Params:
`handle` - JSHandle instance.

Returns:
Parsed JSON value.
sourceraw docstring

last-elementclj

(last-element loc)

Returns the last element matching the locator.

Params: loc - Locator instance.

Returns: Locator for the last element.

Returns the last element matching the locator.

Params:
`loc` - Locator instance.

Returns:
Locator for the last element.
sourceraw docstring

loc-filterclj

(loc-filter loc opts)

Filters this locator to a narrower set.

Params: loc - Locator instance. opts - Map with optional: :has-text - String or Pattern. :has - Locator. :has-not - Locator. :has-not-text - String or Pattern.

Returns: Locator instance.

Filters this locator to a narrower set.

Params:
`loc`  - Locator instance.
`opts` - Map with optional:
  :has-text - String or Pattern.
  :has      - Locator.
  :has-not  - Locator.
  :has-not-text - String or Pattern.

Returns:
Locator instance.
sourceraw docstring

loc-get-by-labelclj

(loc-get-by-label loc text)

Locates elements by label within this locator.

Params: loc - Locator instance. text - String or Pattern.

Returns: Locator instance.

Locates elements by label within this locator.

Params:
`loc`  - Locator instance.
`text` - String or Pattern.

Returns:
Locator instance.
sourceraw docstring

loc-get-by-roleclj

(loc-get-by-role loc role)

Locates elements by ARIA role within this locator.

Params: loc - Locator instance. role - AriaRole enum value.

Returns: Locator instance.

Locates elements by ARIA role within this locator.

Params:
`loc`  - Locator instance.
`role` - AriaRole enum value.

Returns:
Locator instance.
sourceraw docstring

loc-get-by-test-idclj

(loc-get-by-test-id loc test-id)

Locates elements by test ID within this locator.

Params: loc - Locator instance. test-id - String or Pattern.

Returns: Locator instance.

Locates elements by test ID within this locator.

Params:
`loc`     - Locator instance.
`test-id` - String or Pattern.

Returns:
Locator instance.
sourceraw docstring

loc-get-by-textclj

(loc-get-by-text loc text)

Locates elements by text within this locator.

Params: loc - Locator instance. text - String or Pattern.

Returns: Locator instance.

Locates elements by text within this locator.

Params:
`loc`  - Locator instance.
`text` - String or Pattern.

Returns:
Locator instance.
sourceraw docstring

loc-locatorclj

(loc-locator loc selector)

Creates a sub-locator within this locator.

Params: loc - Locator instance. selector - String. CSS or text selector.

Returns: Locator instance.

Creates a sub-locator within this locator.

Params:
`loc`      - Locator instance.
`selector` - String. CSS or text selector.

Returns:
Locator instance.
sourceraw docstring

locator-screenshotclj

(locator-screenshot loc)
(locator-screenshot loc ss-opts)

Takes a screenshot of the element.

Params: loc - Locator instance. opts - Map, optional. Screenshot options.

Returns: byte[] or anomaly map.

Takes a screenshot of the element.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Screenshot options.

Returns:
byte[] or anomaly map.
sourceraw docstring

nth-elementclj

(nth-element loc index)

Returns the nth element matching the locator.

Params: loc - Locator instance. index - Long. Zero-based index.

Returns: Locator for the nth element.

Returns the nth element matching the locator.

Params:
`loc`   - Locator instance.
`index` - Long. Zero-based index.

Returns:
Locator for the nth element.
sourceraw docstring

pressclj

(press loc key)
(press loc key press-opts)

Presses a key or key combination.

Params: loc - Locator instance. key - String. Key to press (e.g. "Enter", "Control+a"). opts - Map, optional. Press options.

Returns: nil or anomaly map on failure.

Presses a key or key combination.

Params:
`loc` - Locator instance.
`key` - String. Key to press (e.g. "Enter", "Control+a").
`opts` - Map, optional. Press options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

scroll-into-viewclj

(scroll-into-view loc)

Scrolls element into view.

Params: loc - Locator instance.

Returns: nil or anomaly map.

Scrolls element into view.

Params:
`loc` - Locator instance.

Returns:
nil or anomaly map.
sourceraw docstring

select-optionclj

(select-option loc values)

Selects options in a select element.

Params: loc - Locator instance. values - String, vector of strings, or SelectOption.

Returns: Vector of selected values or anomaly map.

Selects options in a select element.

Params:
`loc`    - Locator instance.
`values` - String, vector of strings, or SelectOption.

Returns:
Vector of selected values or anomaly map.
sourceraw docstring

set-input-files!clj

(set-input-files! loc files)

Sets the value of a file input element.

Params: loc - Locator instance. files - String path or vector of string paths.

Returns: nil or anomaly map.

Sets the value of a file input element.

Params:
`loc`   - Locator instance.
`files` - String path or vector of string paths.

Returns:
nil or anomaly map.
sourceraw docstring

tap-elementclj

(tap-element loc)

Taps an element (for touch devices).

Params: loc - Locator instance.

Returns: nil or anomaly map on failure.

Taps an element (for touch devices).

Params:
`loc` - Locator instance.

Returns:
nil or anomaly map on failure.
sourceraw docstring

text-contentclj

(text-content loc)

Returns the text content of the element.

Params: loc - Locator instance.

Returns: String or nil, or anomaly map.

Returns the text content of the element.

Params:
`loc` - Locator instance.

Returns:
String or nil, or anomaly map.
sourceraw docstring

type-textclj

(type-text loc text)
(type-text loc text type-opts)

Types text into an element character by character.

Params: loc - Locator instance. text - String. Text to type. opts - Map, optional. Type options.

Returns: nil or anomaly map on failure.

Types text into an element character by character.

Params:
`loc`  - Locator instance.
`text` - String. Text to type.
`opts` - Map, optional. Type options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

uncheckclj

(uncheck loc)
(uncheck loc uncheck-opts)

Unchecks a checkbox.

Params: loc - Locator instance. opts - Map, optional. Uncheck options.

Returns: nil or anomaly map on failure.

Unchecks a checkbox.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Uncheck options.

Returns:
nil or anomaly map on failure.
sourceraw docstring

wait-forclj

(wait-for loc)
(wait-for loc wait-opts)

Waits for the locator to satisfy a condition.

Params: loc - Locator instance. opts - Map, optional. Wait options (:state, :timeout).

Returns: nil or anomaly map on timeout.

Waits for the locator to satisfy a condition.

Params:
`loc`  - Locator instance.
`opts` - Map, optional. Wait options (:state, :timeout).

Returns:
nil or anomaly map on timeout.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close