Liking cljdoc? Tell your friends :D

chromex.ext.automation

clj

The chrome.automation API allows developers to access the automation (accessibility) tree for the browser. The tree resembles the DOM tree, but only exposes the semantic structure of a page. It can be used to programmatically interact with a page by examining names, roles, and states, listening for events, and performing actions on nodes.

The chrome.automation API allows developers to access the
automation (accessibility) tree for the browser. The tree resembles the DOM
tree, but only exposes the semantic structure of a page. It can be
used to programmatically interact with a page by examining names, roles, and
states, listening for events, and performing actions on nodes.

  * available since Chrome 77
  * https://developer.chrome.com/extensions/automation
raw docstring

add-tree-change-observerclj/smacro

(add-tree-change-observer filter)

Add a tree change observer. Tree change observers are static/global, they listen to changes across all trees. Pass a filter to determine what specific tree changes to listen to, and note that listnening to all tree changes can be expensive.

|filter| - https://developer.chrome.com/extensions/automation#property-addTreeChangeObserver-filter.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [tree-change] where:

|tree-change| - https://developer.chrome.com/extensions/automation#property-observer-treeChange.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-addTreeChangeObserver.

Add a tree change observer. Tree change observers are static/global, they listen to changes across all trees. Pass a filter
to determine what specific tree changes to listen to, and note that listnening to all tree changes can be expensive.

  |filter| - https://developer.chrome.com/extensions/automation#property-addTreeChangeObserver-filter.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [tree-change] where:

  |tree-change| - https://developer.chrome.com/extensions/automation#property-observer-treeChange.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-addTreeChangeObserver.
sourceraw docstring

add-tree-change-observer*cljs

(add-tree-change-observer* config filter)
source

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-desktopclj/smacro

(get-desktop)

Get the automation tree for the whole desktop which consists of all on screen views. Note this API is currently only supported on Chrome OS.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [root-node] where:

|root-node| - https://developer.chrome.com/extensions/automation#property-callback-rootNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getDesktop.

Get the automation tree for the whole desktop which consists of all on screen views. Note this API is currently only
supported on Chrome OS.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [root-node] where:

  |root-node| - https://developer.chrome.com/extensions/automation#property-callback-rootNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getDesktop.
sourceraw docstring

get-desktop*cljs

(get-desktop* config)
source

get-focusclj/smacro

(get-focus)

Get the automation node that currently has focus, globally. Will return null if none of the nodes in any loaded trees have focus.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [focused-node] where:

|focused-node| - https://developer.chrome.com/extensions/automation#property-callback-focusedNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getFocus.

Get the automation node that currently has focus, globally. Will return null if none of the nodes in any loaded trees have
focus.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [focused-node] where:

  |focused-node| - https://developer.chrome.com/extensions/automation#property-callback-focusedNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getFocus.
sourceraw docstring

get-focus*cljs

(get-focus* config)
source

get-treeclj/smacro

(get-tree)
(get-tree tab-id)

Get the automation tree for the tab with the given tabId, or the current tab if no tabID is given, enabling automation if necessary. Returns a tree with a placeholder root node; listen for the 'loadComplete' event to get a notification that the tree has fully loaded (the previous root node reference will stop working at or before this point).

|tab-id| - https://developer.chrome.com/extensions/automation#property-getTree-tabId.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [root-node] where:

|root-node| - https://developer.chrome.com/extensions/automation#property-callback-rootNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getTree.

Get the automation tree for the tab with the given tabId, or the current tab if no tabID is given, enabling automation if
necessary. Returns a tree with a placeholder root node; listen for the 'loadComplete' event to get a notification that the
tree has fully loaded (the previous root node reference will stop working at or before this point).

  |tab-id| - https://developer.chrome.com/extensions/automation#property-getTree-tabId.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [root-node] where:

  |root-node| - https://developer.chrome.com/extensions/automation#property-callback-rootNode.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-getTree.
sourceraw docstring

get-tree*cljs

(get-tree* config tab-id)
source

language-annotation-for-string-attributeclj/smacro

(language-annotation-for-string-attribute attribute)

Returns the detected languages for the provided string attribute as an array of LanguageSpan objects. There are several guarantees about the format of the LanguageSpan array: 1. Is either empty or contains LanguageSpans that cover all indices in the associated string attribute value. 2. Is sorted by increasing startIndex (those with smaller startIndex appear first). 3. LanguageSpans are non-overlapping and contain exactly one language.

|attribute| - https://developer.chrome.com/extensions/automation#property-languageAnnotationForStringAttribute-attribute.

https://developer.chrome.com/extensions/automation#method-languageAnnotationForStringAttribute.

Returns the detected languages for the provided string attribute as an array of LanguageSpan objects. There are several
guarantees about the format of the LanguageSpan array: 1. Is either empty or contains LanguageSpans that cover all indices
in the associated string attribute value. 2. Is sorted by increasing startIndex (those with smaller startIndex appear
first). 3. LanguageSpans are non-overlapping and contain exactly one language.

  |attribute| - https://developer.chrome.com/extensions/automation#property-languageAnnotationForStringAttribute-attribute.

https://developer.chrome.com/extensions/automation#method-languageAnnotationForStringAttribute.
sourceraw docstring

language-annotation-for-string-attribute*cljs

(language-annotation-for-string-attribute* config attribute)
source

remove-tree-change-observerclj/smacro

(remove-tree-change-observer)

Remove a tree change observer.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [tree-change] where:

|tree-change| - https://developer.chrome.com/extensions/automation#property-observer-treeChange.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-removeTreeChangeObserver.

Remove a tree change observer.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [tree-change] where:

  |tree-change| - https://developer.chrome.com/extensions/automation#property-observer-treeChange.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/automation#method-removeTreeChangeObserver.
sourceraw docstring

remove-tree-change-observer*cljs

(remove-tree-change-observer* config)
source

set-document-selectionclj/smacro

(set-document-selection params)

Sets the selection in a tree. This creates a selection in a single tree (anchorObject and focusObject must have the same root). Everything in the tree between the two node/offset pairs gets included in the selection. The anchor is where the user started the selection, while the focus is the point at which the selection gets extended e.g. when dragging with a mouse or using the keyboard. For nodes with the role staticText, the offset gives the character offset within the value where the selection starts or ends, respectively.

|params| - https://developer.chrome.com/extensions/automation#property-setDocumentSelection-params.

https://developer.chrome.com/extensions/automation#method-setDocumentSelection.

Sets the selection in a tree. This creates a selection in a single tree (anchorObject and focusObject must have the same
root). Everything in the tree between the two node/offset pairs gets included in the selection. The anchor is where the
user started the selection, while the focus is the point at which the selection gets extended e.g. when dragging with a
mouse or using the keyboard. For nodes with the role staticText, the offset gives the character offset within the value
where the selection starts or ends, respectively.

  |params| - https://developer.chrome.com/extensions/automation#property-setDocumentSelection-params.

https://developer.chrome.com/extensions/automation#method-setDocumentSelection.
sourceraw docstring

set-document-selection*cljs

(set-document-selection* config params)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.ext.automation namespace.

Taps all valid non-deprecated events in chromex.ext.automation namespace.
sourceraw docstring

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

× close