Liking cljdoc? Tell your friends :D

cuic.core


*browser*clj

source

*config*clj

source

-browserclj

(-browser)

Returns the current browser instance. ** Used internally, do not touch! **

Returns the current browser instance.
** Used internally, do not touch! **
sourceraw docstring

-run-mutationcljmacro

(-run-mutation & body)

Runs the given code block inside mutation wrapper. ** Used internally, do not touch! **

Runs the given code block inside mutation wrapper.
** Used internally, do not touch! **
sourceraw docstring

-run-node-mutationcljmacro

(-run-node-mutation [node-binding node-expr] & body)

Shortcut for mutation of the given visible node. ** Used internally, do not touch! **

Shortcut for mutation of the given visible node.
** Used internally, do not touch! **
sourceraw docstring

-run-node-querycljmacro

(-run-node-query [node-binding node-expr] expr)

Shortcut for data query of the given visible node. ** Used internally, do not touch! **

Shortcut for data query of the given visible node.
** Used internally, do not touch! **
sourceraw docstring

active?clj

(active? node)

Returns boolean whether the given node is active (focused) or not

Returns boolean whether the given node is active (focused) or not
sourceraw docstring

attrsclj

(attrs node)

Returns a map of attributes and their values for the given DOM node

Returns a map of attributes and their values for the given DOM node
sourceraw docstring

checked?clj

(checked? node)

Returns boolean whether the given radio button / checkbox is checked or not

Returns boolean whether the given radio button / checkbox is checked or not
sourceraw docstring

classesclj

(classes node)

Returns a set of CSS classes for the given DOM node

Returns a set of CSS classes for the given DOM node
sourceraw docstring

clear-text!clj

(clear-text! input-node)

Clears all text from the given input DOM element by selecting all text and pressing backspace. If element is not active, it is activated first by clicking it.

Clears all text from the given input DOM element by selecting all
text and pressing backspace. If element is not active, it is
activated first by clicking it.
sourceraw docstring

click!clj

(click! node)

Clicks the given DOM element.

Clicks the given DOM element.
sourceraw docstring

close!clj

(close! resource)

Closes the given resource

Closes the given resource
sourceraw docstring

default-mutation-wrapperclj

(default-mutation-wrapper operation)

Default wrapper that surrounds for each mutation function. Holds the execution until all document (re)loads, XHR requests and animations have been finished that were started after the mutation.

Default wrapper that surrounds for each mutation function.
Holds the execution until all document (re)loads, XHR requests
and animations have been finished that were started after
the mutation.
sourceraw docstring

documentclj

(document)

Returns the root document node or nil if document is not available

Returns the root document node or nil if document is not available
sourceraw docstring

evalclj

(eval js-code)

Evaluate JavaScript expression in the global JS context. Return value of the expression is converted into Clojure data structure. Supports async expressions (await keyword).

Evaluate JavaScript expression in the global JS context. Return value of the
expression is converted into Clojure data structure. Supports async
expressions (await keyword).
sourceraw docstring

eval-inclj

(eval-in node-ctx js-code)
source

focus!clj

(focus! node)

Focus on the given DOM element.

Focus on the given DOM element.
sourceraw docstring

goto!clj

(goto! url)

Navigates the page to the given URL.

Navigates the page to the given URL.
sourceraw docstring

has-class?clj

(has-class? node class)

Returns boolean whether the given DOM node has the given class or not

Returns boolean whether the given DOM node has the given class or not
sourceraw docstring

hover!clj

(hover! node)

Hover mouse over the given DOM element.

Hover mouse over the given DOM element.
sourceraw docstring

launch!clj

(launch!)
(launch! opts)

TODO docs

TODO docs
sourceraw docstring

matches?clj

(matches? node selector)

Returns boolean whether the given node matches the given CSS selector or not.

Returns boolean whether the given node matches the given CSS selector or not.
sourceraw docstring

optionsclj

(options select-node)

Returns a list of options {:keys [value text selected]} for the given HTML select element.

Returns a list of options {:keys [value text selected]} for the given HTML
select element.
sourceraw docstring

outer-htmlclj

(outer-html node)

Returns the outer html of the given node in clojure.data.xml format (node is a map of {:keys [tag attrs content]})

Returns the outer html of the given node in clojure.data.xml format
(node is a map of {:keys [tag attrs content]})
sourceraw docstring

page-screenshotclj

(page-screenshot)
(page-screenshot {:keys [masked-nodes]})

Takes a screen capture from the currently visible page and returns a BufferedImage instance containing the screenshot.

Takes a screen capture from the currently visible page and returns a
BufferedImage instance containing the screenshot.
sourceraw docstring

png-bytesclj

(png-bytes image)

Converts the given (screenshot) image to PNG format and returns a byte array of the encoded data.

Converts the given (screenshot) image to PNG format and returns a byte array
of the encoded data.
sourceraw docstring

qclj

(q selector)
(q root-node selector)

Performs a CSS query to the subtree of the given root node and returns a vector of matched nodes. If called without the root node, page document node is used as a root node for the query.

Performs a CSS query to the subtree of the given root node and returns a
vector of matched nodes. If called without the root node, page document node
is used as a root node for the query.
sourceraw docstring

running-activitiesclj

(running-activities)

Returns a vector of the currently running activities.

Returns a vector of the currently running activities.
sourceraw docstring

screenshotclj

(screenshot node)
(screenshot node {:keys [masked-nodes]})

Takes a screen capture from the given DOM node and returns a BufferedImage instance containing the screenshot. DOM node must be visible or otherwise an exception is thrown.

Takes a screen capture from the given DOM node and returns a BufferedImage
instance containing the screenshot. DOM node must be visible or otherwise
an exception is thrown.
sourceraw docstring

scroll-to!clj

(scroll-to! node)

Scrolls window to the given DOM node if that node is not already visible in the current viewport

Scrolls window to the given DOM node if that node is not already visible
in the current viewport
sourceraw docstring

select!clj

(select! select-node & values)
source

select-text!clj

(select-text! input-node)

Selects all text from the given input DOM element. If element is not active, it is activated first by clicking it.

Selects all text from the given input DOM element. If element is
not active, it is activated first by clicking it.
sourceraw docstring

sleepclj

(sleep ms)

Holds the execution the given milliseconds

Holds the execution the given milliseconds
sourceraw docstring

text-contentclj

(text-content node)

Returns the raw text content of the given DOM node.

Returns the raw text content of the given DOM node.
sourceraw docstring

type!clj

(type! input-node & keys)

Types text to the given input element. If element is not active, it is activated first by clicking it.

Types text to the given input element. If element is not active,
it is activated first by clicking it.
sourceraw docstring

valueclj

(value input-node)

Returns the current value of the given input element.

Returns the current value of the given input element.
sourceraw docstring

visible?clj

(visible? node)

Returns boolean whether the given DOM node is visible in DOM or not

Returns boolean whether the given DOM node is visible in DOM or not
sourceraw docstring

waitcljmacro

(wait expr)

Evaluates the given expression and returns the value if it is truthy, otherwise pauses execution for a moment and re-tries to evaluate the expression. Continues this until thruthy value or timeout exception occurs.

Evaluates the given expression and returns the value if it is truthy,
otherwise pauses execution for a moment and re-tries to evaluate the
expression. Continues this until thruthy value or timeout exception
occurs.
sourceraw docstring

with-retrycljmacro

(with-retry & statements)

Evaluates each (mutation) statement in retry-loop so that if the mutation throws any cuic related error, the errored statement is retried until the expression passes or timeout exception occurs.

Evaluates each (mutation) statement in retry-loop so that if the
mutation throws any cuic related error, the errored statement is
retried until the expression passes or timeout exception occurs.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close