(-browser)
Returns the current browser instance. ** Used internally, do not touch! **
Returns the current browser instance. ** Used internally, do not touch! **
(-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! **
(-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! **
(-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! **
(active? node)
Returns boolean whether the given node is active (focused) or not
Returns boolean whether the given node is active (focused) or not
(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
(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
(classes node)
Returns a set of CSS classes for the given DOM node
Returns a set of CSS classes for the given DOM node
(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.
(click! node)
Clicks the given DOM element.
Clicks the given DOM element.
(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.
(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
(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).
(focus! node)
Focus on the given DOM element.
Focus on the given DOM element.
(goto! url)
Navigates the page to the given URL.
Navigates the page to the given URL.
(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
(hover! node)
Hover mouse over the given DOM element.
Hover mouse over the given DOM element.
(inner-text node)
Returns the inner text of the given DOM node
Returns the inner text of the given DOM node
(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.
(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.
(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]})
(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.
(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.
(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.
(running-activities)
Returns a vector of the currently running activities.
Returns a vector of the currently running activities.
(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.
(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
(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.
(sleep ms)
Holds the execution the given milliseconds
Holds the execution the given milliseconds
(term-freqs node)
Returns a number of occurrences per term in the given nodes inner text
Returns a number of occurrences per term in the given nodes inner text
(text-content node)
Returns the raw text content of the given DOM node.
Returns the raw text content of the given DOM node.
(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.
(value input-node)
Returns the current value of the given input element.
Returns the current value of the given input element.
(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
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close