Public Vars
- *wait-interval* (clj)
- *wait-timeout* (clj)
- ->RemoteFile (clj)
- RemoteFile (clj)
- absent? (clj)
- accept-alert (clj)
- add-action (clj)
- add-double-pause (clj)
- add-key-down (clj)
- add-key-press (clj)
- add-key-up (clj)
- add-pause (clj)
- add-pointer-cancel (clj)
- add-pointer-click (clj)
- add-pointer-click-el (clj)
- add-pointer-double-click (clj)
- add-pointer-double-click-el (clj)
- add-pointer-down (clj)
- add-pointer-move (clj)
- add-pointer-move-to-el (clj)
- add-pointer-up (clj)
- add-script (clj)
- back (clj)
- boot-driver (clj)
- child (clj)
- children (clj)
- chrome (clj)
- chrome-headless (clj)
- chrome? (clj)
- clear (clj)
- clear-el (clj)
- click (clj)
- click-el (clj)
- click-multi (clj)
- click-single (clj)
- click-visible (clj)
- close-window (clj)
- create-session (clj)
- defaults (clj)
- defaults-global (clj)
- delete-cookie (clj)
- delete-cookies (clj)
- delete-session (clj)
- disabled? (clj)
- disconnect-driver (clj)
- dismiss-alert (clj)
- displayed-el? (clj)
- displayed? (clj)
- doto-wait (clj)
- double-click (clj)
- double-click-el (clj)
- drag-and-drop (clj)
- driver? (clj)
- edge (clj)
- edge-headless (clj)
- edge? (clj)
- el->ref (clj)
- enabled-el? (clj)
- enabled? (clj)
- execute (clj)
- exists? (clj)
- fill (clj)
- fill-active (clj)
- fill-el (clj)
- fill-human (clj)
- fill-human-el (clj)
- fill-human-multi (clj)
- fill-multi (clj)
- firefox (clj)
- firefox-headless (clj)
- firefox? (clj)
- forward (clj)
- get-alert-text (clj)
- get-cookie (clj)
- get-cookies (clj)
- get-element-attr (clj)
- get-element-attr-el (clj)
- get-element-attrs (clj)
- get-element-box (clj)
- get-element-css (clj)
- get-element-css-el (clj)
- get-element-csss (clj)
- get-element-inner-html (clj)
- get-element-inner-html-el (clj)
- get-element-location (clj)
- get-element-location-el (clj)
- get-element-properties (clj)
- get-element-property (clj)
- get-element-property-el (clj)
- get-element-size (clj)
- get-element-size-el (clj)
- get-element-tag (clj)
- get-element-tag-el (clj)
- get-element-text (clj)
- get-element-text-el (clj)
- get-element-value (clj)
- get-element-value-el (clj)
- get-hash (clj)
- get-implicit-timeout (clj)
- get-log-types (clj)
- get-logs (clj)
- get-page-load-timeout (clj)
- get-script-timeout (clj)
- get-scroll (clj)
- get-source (clj)
- get-status (clj)
- get-title (clj)
- get-url (clj)
- get-user-agent (clj)
- get-window-handle (clj)
- get-window-handles (clj)
- get-window-position (clj)
- get-window-size (clj)
- go (clj)
- has-alert? (clj)
- has-class-el? (clj)
- has-class? (clj)
- has-no-alert? (clj)
- has-no-class? (clj)
- has-text? (clj)
- headless? (clj)
- intersects? (clj)
- invisible? (clj)
- js-async (clj)
- js-execute (clj)
- js-localstorage-clear (clj)
- left-click (clj)
- left-click-on (clj)
- make-action-input (clj)
- make-key-input (clj)
- make-mouse-input (clj)
- make-pen-input (clj)
- make-pointer-input (clj)
- make-touch-input (clj)
- map->RemoteFile (clj)
- maximize (clj)
- middle-click (clj)
- middle-click-on (clj)
- mouse-btn-down (clj)
- mouse-btn-up (clj)
- mouse-click (clj)
- mouse-click-on (clj)
- mouse-move-to (clj)
- perform-actions (clj)
- phantom (clj)
- phantom? (clj)
- print-page (clj)
- query (clj)
- query-all (clj)
- query-tree (clj)
- quit (clj)
- rand-uuid (clj)
- refresh (clj)
- release-actions (clj)
- reload (clj)
- remote-file (clj)
- right-click (clj)
- right-click-on (clj)
- running? (clj)
- safari (clj)
- safari? (clj)
- screenshot (clj)
- screenshot-element (clj)
- scroll (clj)
- scroll-bottom (clj)
- scroll-by (clj)
- scroll-down (clj)
- scroll-left (clj)
- scroll-offset (clj)
- scroll-query (clj)
- scroll-right (clj)
- scroll-top (clj)
- scroll-up (clj)
- select (clj)
- selected-el? (clj)
- selected? (clj)
- set-cookie (clj)
- set-hash (clj)
- set-implicit-timeout (clj)
- set-page-load-timeout (clj)
- set-script-timeout (clj)
- set-window-position (clj)
- set-window-size (clj)
- stop-driver (clj)
- submit (clj)
- supports-logs? (clj)
- switch-frame (clj)
- switch-frame-first (clj)
- switch-frame-parent (clj)
- switch-frame-top (clj)
- switch-window (clj)
- switch-window-next (clj)
- touch-down (clj)
- touch-move (clj)
- touch-tap (clj)
- touch-up (clj)
- upload-file (clj)
- use-css (clj)
- use-xpath (clj)
- visible? (clj)
- wait (clj)
- wait-absent (clj)
- wait-disabled (clj)
- wait-enabled (clj)
- wait-exists (clj)
- wait-has-alert (clj)
- wait-has-class (clj)
- wait-has-text (clj)
- wait-has-text-everywhere (clj)
- wait-invisible (clj)
- wait-predicate (clj)
- wait-running (clj)
- wait-visible (clj)
- when-chrome (clj)
- when-edge (clj)
- when-firefox (clj)
- when-headless (clj)
- when-not-chrome (clj)
- when-not-drivers (clj)
- when-not-edge (clj)
- when-not-firefox (clj)
- when-not-headless (clj)
- when-not-phantom (clj)
- when-not-predicate (clj)
- when-not-safari (clj)
- when-phantom (clj)
- when-predicate (clj)
- when-safari (clj)
- with-chrome (clj)
- with-chrome-headless (clj)
- with-css (clj)
- with-driver (clj)
- with-edge (clj)
- with-edge-headless (clj)
- with-firefox (clj)
- with-firefox-headless (clj)
- with-frame (clj)
- with-http-error (clj)
- with-key-down (clj)
- with-mouse-btn (clj)
- with-phantom (clj)
- with-pointer-btn-down (clj)
- with-pointer-left-btn-down (clj)
- with-postmortem (clj)
- with-safari (clj)
- with-screenshots (clj)
- with-script-timeout (clj)
- with-wait (clj)
- with-wait-interval (clj)
- with-wait-timeout (clj)
- with-xpath (clj)
Back
query (clj)
(source)function
(query driver q)
(query driver q & more)
Use `driver` to find and return the first element on current page matching `q`.
Query `q` can be:
- `:active` the current active element
- a keyword to find element by it's ID attribute:
- `:my-id`
- (use `{:id "my-id"}` for ids that cannot be represented as keywords)
- an XPath expression:
- `".//input[@id='uname']"`
- a map with either `:xpath` or `:css`:
- `{:xpath ".//input[@id='uname']"`}`
- `{:css "input#uname[name='username']"}`
- any other map is converted to an XPath expression:
- `{:tag :div}`
- is equivalent to XPath: `".//div"`
- multiple of the above (wrapped in a vector or not).
The result of each expression is fed into the next.
- `{:tag :div} ".//input[@id='uname']"`
- `[{:tag :div} ".//input[@id='uname']"]`
Returns the found element's unique identifier, or throws when not found.
See [Selecting Elements](/doc/01-user-guide.adoc#querying) for more details.