Skip to content

Compare: Taxi API Documentation

Showing with 87 additions and 87 deletions.
  1. +87 −87 Taxi-API-Documentation.md
View
174 Taxi-API-Documentation.md
@@ -1,6 +1,6 @@
<div class="index"><p>Public variables and functions:</p><ul style="display: inline;"><span>add-cookie</span>&nbsp;&nbsp;<span>attribute</span>&nbsp;&nbsp;<span>back</span>&nbsp;&nbsp;<span>clear</span>&nbsp;&nbsp;<span>click</span>&nbsp;&nbsp;<span>close</span>&nbsp;&nbsp;<span>cookie</span>&nbsp;&nbsp;<span>cookies</span>&nbsp;&nbsp;<span>css-finder</span>&nbsp;&nbsp;<span>current-url</span>&nbsp;&nbsp;<span>delete-all-cookies</span>&nbsp;&nbsp;<span>delete-cookie</span>&nbsp;&nbsp;<span>deselect</span>&nbsp;&nbsp;<span>deselect-all</span>&nbsp;&nbsp;<span>deselect-by-index</span>&nbsp;&nbsp;<span>deselect-by-text</span>&nbsp;&nbsp;<span>deselect-by-value</span>&nbsp;&nbsp;<span>deselect-option</span>&nbsp;&nbsp;<span>displayed?</span>&nbsp;&nbsp;<span>drag-and-drop</span>&nbsp;&nbsp;<span>drag-and-drop-by</span>&nbsp;&nbsp;<span>element</span>&nbsp;&nbsp;<span>elements</span>&nbsp;&nbsp;<span>enabled?</span>&nbsp;&nbsp;<span>execute-script</span>&nbsp;&nbsp;<span>exists?</span>&nbsp;&nbsp;<span>find-element</span>&nbsp;&nbsp;<span>find-element-under</span>&nbsp;&nbsp;<span>find-elements</span>&nbsp;&nbsp;<span>find-elements-under</span>&nbsp;&nbsp;<span>find-table-cell</span>&nbsp;&nbsp;<span>find-table-row</span>&nbsp;&nbsp;<span>find-window</span>&nbsp;&nbsp;<span>find-windows</span>&nbsp;&nbsp;<span>flash</span>&nbsp;&nbsp;<span>focus</span>&nbsp;&nbsp;<span>forward</span>&nbsp;&nbsp;<span>get-url</span>&nbsp;&nbsp;<span>html</span>&nbsp;&nbsp;<span>implicit-wait</span>&nbsp;&nbsp;<span>input-text</span>&nbsp;&nbsp;<span>intersect?</span>&nbsp;&nbsp;<span>location</span>&nbsp;&nbsp;<span>location-once-visible</span>&nbsp;&nbsp;<span>multiple?</span>&nbsp;&nbsp;<span>options</span>&nbsp;&nbsp;<span>other-window-handles</span>&nbsp;&nbsp;<span>page-source</span>&nbsp;&nbsp;<span>present?</span>&nbsp;&nbsp;<span>quick-fill</span>&nbsp;&nbsp;<span>quick-fill-submit</span>&nbsp;&nbsp;<span>quit</span>&nbsp;&nbsp;<span>rectangle</span>&nbsp;&nbsp;<span>refresh</span>&nbsp;&nbsp;<span>select</span>&nbsp;&nbsp;<span>select-all</span>&nbsp;&nbsp;<span>select-by-index</span>&nbsp;&nbsp;<span>select-by-text</span>&nbsp;&nbsp;<span>select-by-value</span>&nbsp;&nbsp;<span>select-option</span>&nbsp;&nbsp;<span>selected-options</span>&nbsp;&nbsp;<span>selected?</span>&nbsp;&nbsp;<span>send-keys</span>&nbsp;&nbsp;<span>set-driver!</span>&nbsp;&nbsp;<span>set-finder!</span>&nbsp;&nbsp;<span>size</span>&nbsp;&nbsp;<span>submit</span>&nbsp;&nbsp;<span>switch-to-active</span>&nbsp;&nbsp;<span>switch-to-default</span>&nbsp;&nbsp;<span>switch-to-frame</span>&nbsp;&nbsp;<span>switch-to-other-window</span>&nbsp;&nbsp;<span>switch-to-window</span>&nbsp;&nbsp;<span>tag</span>&nbsp;&nbsp;<span>take-screenshot</span>&nbsp;&nbsp;<span>text</span>&nbsp;&nbsp;<span>title</span>&nbsp;&nbsp;<span>to</span>&nbsp;&nbsp;<span>toggle</span>&nbsp;&nbsp;<span>value</span>&nbsp;&nbsp;<span>visible?</span>&nbsp;&nbsp;<span>wait-until</span>&nbsp;&nbsp;<span>window-handle</span>&nbsp;&nbsp;<span>window-handles</span>&nbsp;&nbsp;<span>with-driver</span>&nbsp;&nbsp;<span>with-driver-fn</span>&nbsp;&nbsp;<span>xpath</span>&nbsp;&nbsp;<span>xpath-finder</span>&nbsp;&nbsp;</ul></div>
-<div class="public" id="var-add-cookie"><h3>add-cookie</h3><div class="usage"><code>(add-cookie cookie-spec)</code><code>(add-cookie driver cookie-spec)</code></div><pre class="doc">Add a cookie to the browser session. The `cookie-spec` is a map which must contain `:name` and `:value` keys, and can also optionally include `:domain`, `:path`, `:expiry`, and `:secure?` (a boolean).
+<div class="public" id="var-add-cookie"><h3>add-cookie</h3><div class="usage"><pre>(add-cookie cookie-spec)</pre><pre>(add-cookie driver cookie-spec)</pre></div><pre class="doc">Add a cookie to the browser session. The `cookie-spec` is a map which must contain `:name` and `:value` keys, and can also optionally include `:domain`, `:path`, `:expiry`, and `:secure?` (a boolean).
Examples:
=========
@@ -15,7 +15,7 @@ Examples:
;;
(add-cookie {:name "foo", :value "bar",
:domain "example.com", :path "a-path",
- :expiry (java.util.Date.), :secure? false}) </pre></div><div class="public" id="var-attribute"><h3>attribute</h3><div class="usage"><code>(attribute q attr)</code><code>(attribute driver q attr)</code></div><pre class="doc">For the first element found with query `q`, return the value of the given `attribute`.
+ :expiry (java.util.Date.), :secure? false}) </pre></div><div class="public" id="var-attribute"><h3>attribute</h3><div class="usage"><pre>(attribute q attr)</pre><pre>(attribute driver q attr)</pre></div><pre class="doc">For the first element found with query `q`, return the value of the given `attribute`.
Examples:
=========
@@ -25,7 +25,7 @@ Examples:
;;
(attribute "a#foo" :id) ;=&gt; "foo"
(attribute "a#foo" :class) ;=&gt; "bar"
-(attribute "a#foo" :target) ;=&gt; "_blank"</pre></div><div class="public" id="var-back"><h3>back</h3><div class="usage"><code>(back)</code><code>(back n)</code><code>(back driver n)</code></div><pre class="doc">Navigate back in the browser history, optionally `n` times.
+(attribute "a#foo" :target) ;=&gt; "_blank"</pre></div><div class="public" id="var-back"><h3>back</h3><div class="usage"><pre>(back)</pre><pre>(back n)</pre><pre>(back driver n)</pre></div><pre class="doc">Navigate back in the browser history, optionally `n` times.
Examples:
=========
@@ -38,44 +38,44 @@ Examples:
;;
;; Specify number of times to go back
;;
-(back 2)</pre></div><div class="public" id="var-clear"><h3>clear</h3><div class="usage"><code>(clear q)</code><code>(clear driver q)</code></div><pre class="doc">Clear the contents (the HTML value attribute) of the first form element found with query `q`.
+(back 2)</pre></div><div class="public" id="var-clear"><h3>clear</h3><div class="usage"><pre>(clear q)</pre><pre>(clear driver q)</pre></div><pre class="doc">Clear the contents (the HTML value attribute) of the first form element found with query `q`.
Examples:
=========
-(clear "input.with-default-text")</pre></div><div class="public" id="var-click"><h3>click</h3><div class="usage"><code>(click q)</code><code>(click driver q)</code></div><pre class="doc">Click the first element found with query `q`.
+(clear "input.with-default-text")</pre></div><div class="public" id="var-click"><h3>click</h3><div class="usage"><pre>(click q)</pre><pre>(click driver q)</pre></div><pre class="doc">Click the first element found with query `q`.
Examples:
=========
-(click "a#foo")</pre></div><div class="public" id="var-close"><h3>close</h3><div class="usage"><code>(close)</code><code>(close driver)</code></div><pre class="doc">Close the browser. If multiple windows are open, this only closes the active window.
+(click "a#foo")</pre></div><div class="public" id="var-close"><h3>close</h3><div class="usage"><pre>(close)</pre><pre>(close driver)</pre></div><pre class="doc">Close the browser. If multiple windows are open, this only closes the active window.
Examples:
=========
-(close)</pre></div><div class="public" id="var-cookie"><h3>cookie</h3><div class="usage"><code>(cookie cookie-name)</code><code>(cookie driver cookie-name)</code></div><pre class="doc">Return the cookie with name `cookie-name`. Returns a `Cookie` record which contains a `:cookie` field with the original Java object.
+(close)</pre></div><div class="public" id="var-cookie"><h3>cookie</h3><div class="usage"><pre>(cookie cookie-name)</pre><pre>(cookie driver cookie-name)</pre></div><pre class="doc">Return the cookie with name `cookie-name`. Returns a `Cookie` record which contains a `:cookie` field with the original Java object.
Examples:
=========
-(cookie "foo")</pre></div><div class="public" id="var-cookies"><h3>cookies</h3><div class="usage"><code>(cookies)</code><code>(cookies driver)</code></div><pre class="doc">Return a seq of all cookies in the browser session. Items are `Cookie` records, which themselves contain a `:cookie` field with the original Java objects.
+(cookie "foo")</pre></div><div class="public" id="var-cookies"><h3>cookies</h3><div class="usage"><pre>(cookies)</pre><pre>(cookies driver)</pre></div><pre class="doc">Return a seq of all cookies in the browser session. Items are `Cookie` records, which themselves contain a `:cookie` field with the original Java objects.
Examples:
=========
-(cookies)</pre></div><div class="public" id="var-css-finder"><h3>css-finder</h3><div class="usage"><code>(css-finder q)</code><code>(css-finder driver q)</code></div><pre class="doc">Given a CSS query `q`, return a lazy seq of the elements found by calling `find-elements` with `by-css`. If `q` is an `Element`, it is returned unchanged.
+(cookies)</pre></div><div class="public" id="var-css-finder"><h3>css-finder</h3><div class="usage"><pre>(css-finder q)</pre><pre>(css-finder driver q)</pre></div><pre class="doc">Given a CSS query `q`, return a lazy seq of the elements found by calling `find-elements` with `by-css`. If `q` is an `Element`, it is returned unchanged.
-This function is used internally by the Taxi API as `*finder*`. See the documentation for `set-finder!` for examples of extending this function or creating your own custom finder function.</pre></div><div class="public" id="var-current-url"><h3>current-url</h3><div class="usage"><code>(current-url)</code><code>(current-url driver)</code></div><pre class="doc">Return the current url of the browser.
+This function is used internally by the Taxi API as `*finder*`. See the documentation for `set-finder!` for examples of extending this function or creating your own custom finder function.</pre></div><div class="public" id="var-current-url"><h3>current-url</h3><div class="usage"><pre>(current-url)</pre><pre>(current-url driver)</pre></div><pre class="doc">Return the current url of the browser.
Examples:
=========
-(current-url)</pre></div><div class="public" id="var-delete-all-cookies"><h3>delete-all-cookies</h3><div class="usage"><code>(delete-all-cookies)</code><code>(delete-all-cookies driver)</code></div><pre class="doc">Delete all cookies from the browser session.
+(current-url)</pre></div><div class="public" id="var-delete-all-cookies"><h3>delete-all-cookies</h3><div class="usage"><pre>(delete-all-cookies)</pre><pre>(delete-all-cookies driver)</pre></div><pre class="doc">Delete all cookies from the browser session.
Examples:
=========
-(delete-all-cookies)</pre></div><div class="public" id="var-delete-cookie"><h3>delete-cookie</h3><div class="usage"><code>(delete-cookie name-or-obj)</code><code>(delete-cookie driver name-or-obj)</code></div><pre class="doc">Provided the name of a cookie or a Cookie record itself, delete it from the browser session.
+(delete-all-cookies)</pre></div><div class="public" id="var-delete-cookie"><h3>delete-cookie</h3><div class="usage"><pre>(delete-cookie name-or-obj)</pre><pre>(delete-cookie driver name-or-obj)</pre></div><pre class="doc">Provided the name of a cookie or a Cookie record itself, delete it from the browser session.
Examples:
=========
@@ -88,36 +88,36 @@ Examples:
;;
;; With `Cookie` record as returned by `cookies` or `cookie` functions
;;
-(delete-cookie a-cookie)</pre></div><div class="public" id="var-deselect"><h3>deselect</h3><div class="usage"><code>(deselect q)</code><code>(deselect driver q)</code></div><pre class="doc">If the first form element found with query `q` is selected, click the element to deselect it. Otherwise, do nothing and just return the element found.
+(delete-cookie a-cookie)</pre></div><div class="public" id="var-deselect"><h3>deselect</h3><div class="usage"><pre>(deselect q)</pre><pre>(deselect driver q)</pre></div><pre class="doc">If the first form element found with query `q` is selected, click the element to deselect it. Otherwise, do nothing and just return the element found.
Examples:
=========
(deselect "input.already-selected") ;=&gt; click
-(deselect "input.not-selected") ;=&gt; do nothing</pre></div><div class="public" id="var-deselect-all"><h3>deselect-all</h3><div class="usage"><code>(deselect-all q)</code><code>(deselect-all driver q)</code></div><pre class="doc">Deselect all options within the first select list found with query `q`.
+(deselect "input.not-selected") ;=&gt; do nothing</pre></div><div class="public" id="var-deselect-all"><h3>deselect-all</h3><div class="usage"><pre>(deselect-all q)</pre><pre>(deselect-all driver q)</pre></div><pre class="doc">Deselect all options within the first select list found with query `q`.
Examples:
=========
-(deselect-all "#my-select-list")</pre></div><div class="public" id="var-deselect-by-index"><h3>deselect-by-index</h3><div class="usage"><code>(deselect-by-index q idx)</code><code>(deselect-by-index driver q idx)</code></div><pre class="doc">Deselect the option element at index `idx` (zero-based) within the first select list found with query `q`.
+(deselect-all "#my-select-list")</pre></div><div class="public" id="var-deselect-by-index"><h3>deselect-by-index</h3><div class="usage"><pre>(deselect-by-index q idx)</pre><pre>(deselect-by-index driver q idx)</pre></div><pre class="doc">Deselect the option element at index `idx` (zero-based) within the first select list found with query `q`.
Examples:
=========
;;
;; Deselect by index, deselect 2nd element
;;
-(deselect-by-index "#my-select-list" 1)</pre></div><div class="public" id="var-deselect-by-text"><h3>deselect-by-text</h3><div class="usage"><code>(deselect-by-text q text)</code><code>(deselect-by-text driver q text)</code></div><pre class="doc">Deselect the option element with visible text `text` within the first select list found with query `q`.
+(deselect-by-index "#my-select-list" 1)</pre></div><div class="public" id="var-deselect-by-text"><h3>deselect-by-text</h3><div class="usage"><pre>(deselect-by-text q text)</pre><pre>(deselect-by-text driver q text)</pre></div><pre class="doc">Deselect the option element with visible text `text` within the first select list found with query `q`.
Examples:
=========
-(deselect-by-text "#my-select-list" "Foo")</pre></div><div class="public" id="var-deselect-by-value"><h3>deselect-by-value</h3><div class="usage"><code>(deselect-by-value q value)</code><code>(deselect-by-value driver q value)</code></div><pre class="doc">Deselect the option element with `value` within the first select list found with query `q`.
+(deselect-by-text "#my-select-list" "Foo")</pre></div><div class="public" id="var-deselect-by-value"><h3>deselect-by-value</h3><div class="usage"><pre>(deselect-by-value q value)</pre><pre>(deselect-by-value driver q value)</pre></div><pre class="doc">Deselect the option element with `value` within the first select list found with query `q`.
Examples:
=========
-(deselect-by-value "#my-select-list" "foo")</pre></div><div class="public" id="var-deselect-option"><h3>deselect-option</h3><div class="usage"><code>(deselect-option q attr-val)</code><code>(deselect-option driver q attr-val)</code></div><pre class="doc">Deselect the option element matching `attr-val` within the first select list found with query `q`.
+(deselect-by-value "#my-select-list" "foo")</pre></div><div class="public" id="var-deselect-option"><h3>deselect-option</h3><div class="usage"><pre>(deselect-option q attr-val)</pre><pre>(deselect-option driver q attr-val)</pre></div><pre class="doc">Deselect the option element matching `attr-val` within the first select list found with query `q`.
The `attr-val` can contain `:index`, `:value`, or `:text` keys to find the target option element. Index is the zero-based order of the option element in the list, value is the value of the HTML value attribute, and text is the visible text of the option element on the page.
@@ -137,21 +137,21 @@ Examples:
;;
;; By visible text of option element
;;
-(deselect-option "#my-select-list" {:value "Foo"})</pre></div><div class="public" id="var-displayed%3F"><h3>displayed?</h3><div class="usage"><code>(displayed? q)</code><code>(displayed? driver q)</code></div><pre class="doc">Return true if the first element found with query `q` is visible on the page.
+(deselect-option "#my-select-list" {:value "Foo"})</pre></div><div class="public" id="var-displayed%3F"><h3>displayed?</h3><div class="usage"><pre>(displayed? q)</pre><pre>(displayed? driver q)</pre></div><pre class="doc">Return true if the first element found with query `q` is visible on the page.
Examples:
=========
(displayed? "div#container") ;=&gt; true
-(displayed? "a.hidden") ;=&gt; false</pre></div><div class="public" id="var-drag-and-drop"><h3>drag-and-drop</h3><div class="usage"><code>(drag-and-drop qa qb)</code><code>(drag-and-drop driver qa qb)</code></div><pre class="doc">Drag the first element found with query `qa` onto the first element found with query `qb`.
+(displayed? "a.hidden") ;=&gt; false</pre></div><div class="public" id="var-drag-and-drop"><h3>drag-and-drop</h3><div class="usage"><pre>(drag-and-drop qa qb)</pre><pre>(drag-and-drop driver qa qb)</pre></div><pre class="doc">Drag the first element found with query `qa` onto the first element found with query `qb`.
Examples:
=========
;;
;; Drag div with id "draggable" onto div with id "droppable"
;;
-(drag-and-drop "#draggable" "#droppable")</pre></div><div class="public" id="var-drag-and-drop-by"><h3>drag-and-drop-by</h3><div class="usage"><code>(drag-and-drop-by q x-y-map)</code><code>(drag-and-drop-by driver q x-y-map)</code></div><pre class="doc">Drag the first element found with query `q` by `:x` pixels to the right and `:y` pixels down, passed in as a map like `{:x 10, :y 10}`. Values default to zero if excluded. Use negative numbers for `:x` and `:y` to move left or up respectively.
+(drag-and-drop "#draggable" "#droppable")</pre></div><div class="public" id="var-drag-and-drop-by"><h3>drag-and-drop-by</h3><div class="usage"><pre>(drag-and-drop-by q x-y-map)</pre><pre>(drag-and-drop-by driver q x-y-map)</pre></div><pre class="doc">Drag the first element found with query `q` by `:x` pixels to the right and `:y` pixels down, passed in as a map like `{:x 10, :y 10}`. Values default to zero if excluded. Use negative numbers for `:x` and `:y` to move left or up respectively.
Examples:
=========
@@ -169,7 +169,7 @@ Examples:
;;
;; Drag a div with id "draggable" 15 pixels to the left and 5 pixels up
;;
-(drag-and-drop-by "#draggable" {:x -15, :y -5})</pre></div><div class="public" id="var-element"><h3>element</h3><div class="usage"><code>(element q)</code><code>(element driver q)</code></div><pre class="doc">Given a query `q`, return the first element that the default finder function returns.
+(drag-and-drop-by "#draggable" {:x -15, :y -5})</pre></div><div class="public" id="var-element"><h3>element</h3><div class="usage"><pre>(element q)</pre><pre>(element driver q)</pre></div><pre class="doc">Given a query `q`, return the first element that the default finder function returns.
Examples:
=========
@@ -191,7 +191,7 @@ Examples:
;;
(-&gt; (element "input#password")
(input-text "my-password")
- submit)</pre></div><div class="public" id="var-elements"><h3>elements</h3><div class="usage"><code>(elements q)</code><code>(elements driver q)</code></div><pre class="doc">Given a query `q`, return the elements that the default finder function returns.
+ submit)</pre></div><div class="public" id="var-elements"><h3>elements</h3><div class="usage"><pre>(elements q)</pre><pre>(elements driver q)</pre></div><pre class="doc">Given a query `q`, return the elements that the default finder function returns.
Examples:
=========
@@ -201,13 +201,13 @@ Examples:
;;
;; Save a seq of anchor tags (links) for later.
;;
-(def target-elements (elements "a"))</pre></div><div class="public" id="var-enabled%3F"><h3>enabled?</h3><div class="usage"><code>(enabled? q)</code><code>(enabled? driver q)</code></div><pre class="doc">Return true if the first form element found with query `q` is enabled (not disabled).
+(def target-elements (elements "a"))</pre></div><div class="public" id="var-enabled%3F"><h3>enabled?</h3><div class="usage"><pre>(enabled? q)</pre><pre>(enabled? driver q)</pre></div><pre class="doc">Return true if the first form element found with query `q` is enabled (not disabled).
Examples:
=========
(enabled? "input") ;=&gt; true
-(enabled? "input[disabled='disabled']") ;=&gt; false</pre></div><div class="public" id="var-execute-script"><h3>execute-script</h3><div class="usage"><code>(execute-script js &amp; js-args)</code></div><pre class="doc">Execute the JavaScript code `js` with arguments `js-args`.
+(enabled? "input[disabled='disabled']") ;=&gt; false</pre></div><div class="public" id="var-execute-script"><h3>execute-script</h3><div class="usage"><pre>(execute-script js &amp; js-args)</pre></div><pre class="doc">Execute the JavaScript code `js` with arguments `js-args`.
Within the script, use document to refer to the current document. Note that local variables will not be available once the script has finished executing, though global variables will persist.
@@ -236,13 +236,13 @@ Examples:
;;
;; Return an element. Note that this currently returns a raw WebElement Java object.
;;
-(execute-script "var myElement = document.getElementById('elementId'); return myElement;")</pre></div><div class="public" id="var-exists%3F"><h3>exists?</h3><div class="usage"><code>(exists? q)</code><code>(exists? driver q)</code></div><pre class="doc">Return true if the first element found with query `q` exists on the current page in the browser.
+(execute-script "var myElement = document.getElementById('elementId'); return myElement;")</pre></div><div class="public" id="var-exists%3F"><h3>exists?</h3><div class="usage"><pre>(exists? q)</pre><pre>(exists? driver q)</pre></div><pre class="doc">Return true if the first element found with query `q` exists on the current page in the browser.
Examples:
=========
(exists? "a#foo") ;=&gt; true
-(exists? "footer") ;=&gt; false</pre></div><div class="public" id="var-find-element"><h3>find-element</h3><div class="usage"><code>(find-element attr-val)</code><code>(find-element driver attr-val)</code></div><pre class="doc">Return first `Element` record that matches the given `attr-val`. Prefer the default behavior of `element` when possible.
+(exists? "footer") ;=&gt; false</pre></div><div class="public" id="var-find-element"><h3>find-element</h3><div class="usage"><pre>(find-element attr-val)</pre><pre>(find-element driver attr-val)</pre></div><pre class="doc">Return first `Element` record that matches the given `attr-val`. Prefer the default behavior of `element` when possible.
Whereas the `element` function uses a query `q` with the default finder function, this function requires an `attr-val` parameter which is either a map or a vector of maps with special semantics for finding elements on the page.
@@ -270,7 +270,7 @@ Examples:
(find-element {:tag :button*, :class "foo"})
(find-element {:tag :radio, :class "choice"})
(find-element [{:tag :div, :id "container"},
- {:tag :a, :class "external"}])</pre></div><div class="public" id="var-find-element-under"><h3>find-element-under</h3><div class="usage"><code>(find-element-under q-parent by-clause)</code></div><pre class="doc">Find the first element that is a child of the element found with query `q-parent`, using the given `by-clause`. If `q-parent` is an `Element`, it will be used as-is. See the functions in `core_by.clj`, available as in the `clj-webdriver.core` namespace.
+ {:tag :a, :class "external"}])</pre></div><div class="public" id="var-find-element-under"><h3>find-element-under</h3><div class="usage"><pre>(find-element-under q-parent by-clause)</pre></div><pre class="doc">Find the first element that is a child of the element found with query `q-parent`, using the given `by-clause`. If `q-parent` is an `Element`, it will be used as-is. See the functions in `core_by.clj`, available as in the `clj-webdriver.core` namespace.
Note that this function is intended to fit better with `find-element` by allowing a full `attr-val` map instead of a `by-clause`, which will be implemented pending a re-write of `find-elements`.
@@ -285,7 +285,7 @@ Examples:
;;
;; Example using map, which generates a (by-xpath ...) form
;;
-(find-element-under "div#container" {:tag :a, :id "foo"})</pre></div><div class="public" id="var-find-elements"><h3>find-elements</h3><div class="usage"><code>(find-elements attr-val)</code><code>(find-elements driver attr-val)</code></div><pre class="doc">Return `Element` records that match the given `attr-val`. Prefer the default behavior of `elements` when possible.
+(find-element-under "div#container" {:tag :a, :id "foo"})</pre></div><div class="public" id="var-find-elements"><h3>find-elements</h3><div class="usage"><pre>(find-elements attr-val)</pre><pre>(find-elements driver attr-val)</pre></div><pre class="doc">Return `Element` records that match the given `attr-val`. Prefer the default behavior of `elements` when possible.
Whereas the `elements` function uses a query `q` with the default finder function, this function requires an `attr-val` parameter which is either a map or a vector of maps with special semantics for finding elements on the page.
@@ -313,7 +313,7 @@ Examples:
(find-elements {:tag :button*, :class "foo"})
(find-elements {:tag :radio, :class "choice"})
(find-elements [{:tag :div, :id "container"},
- {:tag :a, :class "external"}])</pre></div><div class="public" id="var-find-elements-under"><h3>find-elements-under</h3><div class="usage"><code>(find-elements-under q-parent by-clause)</code></div><pre class="doc">Find the elements that are children of the element found with query `q-parent`, using the given `by-clause`. If `q-parent` is an `Element`, it will be used as-is. See the functions in `core_by.clj`, available as in the `clj-webdriver.core` namespace.
+ {:tag :a, :class "external"}])</pre></div><div class="public" id="var-find-elements-under"><h3>find-elements-under</h3><div class="usage"><pre>(find-elements-under q-parent by-clause)</pre></div><pre class="doc">Find the elements that are children of the element found with query `q-parent`, using the given `by-clause`. If `q-parent` is an `Element`, it will be used as-is. See the functions in `core_by.clj`, available as in the `clj-webdriver.core` namespace.
Note that this function is intended to fit better with `find-element` by allowing a full `attr-val` map instead of a `by-clause`, which will be implemented pending a re-write of `find-elements`.
@@ -328,23 +328,23 @@ Examples:
;;
;; Example using map, which generates a (by-xpath ...) form
;;
-(find-elements-under "div#container" {:tag :a, :id "foo"})</pre></div><div class="public" id="var-find-table-cell"><h3>find-table-cell</h3><div class="usage"><code>(find-table-cell table-q coords)</code><code>(find-table-cell driver table-q coords)</code></div><pre class="doc">Within the table found with query `table-q`, return the table cell at coordinates `coords`. The top-left cell has coordinates `[0 0]`.
+(find-elements-under "div#container" {:tag :a, :id "foo"})</pre></div><div class="public" id="var-find-table-cell"><h3>find-table-cell</h3><div class="usage"><pre>(find-table-cell table-q coords)</pre><pre>(find-table-cell driver table-q coords)</pre></div><pre class="doc">Within the table found with query `table-q`, return the table cell at coordinates `coords`. The top-left cell has coordinates `[0 0]`.
Examples:
=========
;;
;; Simple example, find 2nd cell on 2nd row from top
;;
-(find-table-cell "table#my-table" [1 1])</pre></div><div class="public" id="var-find-table-row"><h3>find-table-row</h3><div class="usage"><code>(find-table-row table-q row)</code><code>(find-table-row driver table-q row)</code></div><pre class="doc">Within the table found with query `table-q`, return a seq of all cells at row number `row`. The top-most row is row `0` (zero-based index).
+(find-table-cell "table#my-table" [1 1])</pre></div><div class="public" id="var-find-table-row"><h3>find-table-row</h3><div class="usage"><pre>(find-table-row table-q row)</pre><pre>(find-table-row driver table-q row)</pre></div><pre class="doc">Within the table found with query `table-q`, return a seq of all cells at row number `row`. The top-most row is row `0` (zero-based index).
Examples:
=========
;;
;; Simple example, return cells in second row
;;
-(find-table-row "table#my-table" 1)</pre></div><div class="public" id="var-find-window"><h3>find-window</h3><div class="usage"><code>(find-window attr-val)</code><code>(find-window driver attr-val)</code></div><pre class="doc">Return the first `WindowHandle` record that matches the given `attr-val` map.
+(find-table-row "table#my-table" 1)</pre></div><div class="public" id="var-find-window"><h3>find-window</h3><div class="usage"><pre>(find-window attr-val)</pre><pre>(find-window driver attr-val)</pre></div><pre class="doc">Return the first `WindowHandle` record that matches the given `attr-val` map.
Attributes can be anything in a `WindowHandle` record (`:title` or `:url`) or you can pass an `:index` key and a number value to select a window by its open order.
@@ -364,7 +364,7 @@ Examples:
;;
;; By index
;;
-(find-window {:index 2})</pre></div><div class="public" id="var-find-windows"><h3>find-windows</h3><div class="usage"><code>(find-windows attr-val)</code><code>(find-windows driver attr-val)</code></div><pre class="doc">Return all `WindowHandle` records that match the given `attr-val` map.
+(find-window {:index 2})</pre></div><div class="public" id="var-find-windows"><h3>find-windows</h3><div class="usage"><pre>(find-windows attr-val)</pre><pre>(find-windows driver attr-val)</pre></div><pre class="doc">Return all `WindowHandle` records that match the given `attr-val` map.
Attributes can be anything in a `WindowHandle` record (`:title` or `:url`) or you can pass an `:index` key and a number value to select a window by its open order.
@@ -384,17 +384,17 @@ Examples:
;;
;; By index
;;
-(find-windows {:index 2})</pre></div><div class="public" id="var-flash"><h3>flash</h3><div class="usage"><code>(flash q)</code><code>(flash driver q)</code></div><pre class="doc">Flash the background color of the first element found with query `q`.
+(find-windows {:index 2})</pre></div><div class="public" id="var-flash"><h3>flash</h3><div class="usage"><pre>(flash q)</pre><pre>(flash driver q)</pre></div><pre class="doc">Flash the background color of the first element found with query `q`.
Examples:
=========
-(flash "a.hard-to-see")</pre></div><div class="public" id="var-focus"><h3>focus</h3><div class="usage"><code>(focus q)</code><code>(focus driver q)</code></div><pre class="doc">Explicitly give the first element found with query `q` focus on the page.
+(flash "a.hard-to-see")</pre></div><div class="public" id="var-focus"><h3>focus</h3><div class="usage"><pre>(focus q)</pre><pre>(focus driver q)</pre></div><pre class="doc">Explicitly give the first element found with query `q` focus on the page.
Examples:
=========
-(focus "input.next-element")</pre></div><div class="public" id="var-forward"><h3>forward</h3><div class="usage"><code>(forward)</code><code>(forward n)</code><code>(forward driver n)</code></div><pre class="doc">Navigate forward in the browser history.
+(focus "input.next-element")</pre></div><div class="public" id="var-forward"><h3>forward</h3><div class="usage"><pre>(forward)</pre><pre>(forward n)</pre><pre>(forward driver n)</pre></div><pre class="doc">Navigate forward in the browser history.
Examples:
=========
@@ -407,7 +407,7 @@ Examples:
;;
;; Specify number of times to go back
;;
-(forward 2)</pre></div><div class="public" id="var-get-url"><h3>get-url</h3><div class="usage"><code>(get-url url)</code><code>(get-url driver url)</code></div><pre class="doc">Navigate the browser to `url`.
+(forward 2)</pre></div><div class="public" id="var-get-url"><h3>get-url</h3><div class="usage"><pre>(get-url url)</pre><pre>(get-url driver url)</pre></div><pre class="doc">Navigate the browser to `url`.
Examples:
=========
@@ -424,12 +424,12 @@ Examples:
[path]
(let [base-url "http://example.com/"]
(get-url (str base-url path))))
-;; (go "test-page") would navigate to "http://example.com/test-page"</pre></div><div class="public" id="var-html"><h3>html</h3><div class="usage"><code>(html q)</code><code>(html driver q)</code></div><pre class="doc">Return the inner html of the first element found with query `q`.
+;; (go "test-page") would navigate to "http://example.com/test-page"</pre></div><div class="public" id="var-html"><h3>html</h3><div class="usage"><pre>(html q)</pre><pre>(html driver q)</pre></div><pre class="doc">Return the inner html of the first element found with query `q`.
Examples:
=========
-(html "div.with-interesting-html")</pre></div><div class="public" id="var-implicit-wait"><h3>implicit-wait</h3><div class="usage"><code>(implicit-wait timeout)</code><code>(implicit-wait driver timeout)</code></div><pre class="doc">Set the global `timeout` that the browser should wait when attempting to find elements on the page, before timing out with an exception.
+(html "div.with-interesting-html")</pre></div><div class="public" id="var-implicit-wait"><h3>implicit-wait</h3><div class="usage"><pre>(implicit-wait timeout)</pre><pre>(implicit-wait driver timeout)</pre></div><pre class="doc">Set the global `timeout` that the browser should wait when attempting to find elements on the page, before timing out with an exception.
Examples:
=========
@@ -441,44 +441,44 @@ Examples:
;; noticeable delay to prove that it works
;;
(implicit-wait 3000)
-(execute-script "setTimeout(function () { window.document.body.innerHTML = '&lt;div id='test'&gt;hi!&lt;/div&gt;'}, 1000)")</pre></div><div class="public" id="var-input-text"><h3>input-text</h3><div class="usage"><code>(input-text q s)</code><code>(input-text driver q s)</code></div><pre class="doc">Type the string `s` into the first form element found with query `q`.
+(execute-script "setTimeout(function () { window.document.body.innerHTML = '&lt;div id='test'&gt;hi!&lt;/div&gt;'}, 1000)")</pre></div><div class="public" id="var-input-text"><h3>input-text</h3><div class="usage"><pre>(input-text q s)</pre><pre>(input-text driver q s)</pre></div><pre class="doc">Type the string `s` into the first form element found with query `q`.
Examples:
=========
-(input-text "input#login_field" "semperos")</pre></div><div class="public" id="var-intersect%3F"><h3>intersect?</h3><div class="usage"><code>(intersect? qa qb)</code><code>(intersect? driver qa qb)</code></div><pre class="doc">Return true if the first element found with query `qa` intersects with the first element found with query `qb`.
+(input-text "input#login_field" "semperos")</pre></div><div class="public" id="var-intersect%3F"><h3>intersect?</h3><div class="usage"><pre>(intersect? qa qb)</pre><pre>(intersect? driver qa qb)</pre></div><pre class="doc">Return true if the first element found with query `qa` intersects with the first element found with query `qb`.
Examples:
=========
(intersect? "#login" "#login_field") ;=&gt; true
-(intersect? "#login_field" "#password") ;=&gt; false</pre></div><div class="public" id="var-location"><h3>location</h3><div class="usage"><code>(location q)</code><code>(location driver q)</code></div><pre class="doc">Return a map of `:x` and `:y` coordinates for the first element found with query `q`.
+(intersect? "#login_field" "#password") ;=&gt; false</pre></div><div class="public" id="var-location"><h3>location</h3><div class="usage"><pre>(location q)</pre><pre>(location driver q)</pre></div><pre class="doc">Return a map of `:x` and `:y` coordinates for the first element found with query `q`.
Examples:
=========
-(location "a#foo") ;=&gt; {:x 240, :y 300}</pre></div><div class="public" id="var-location-once-visible"><h3>location-once-visible</h3><div class="usage"><code>(location-once-visible q)</code><code>(location-once-visible driver q)</code></div><pre class="doc">Return a map of `:x` and `:y` coordinates for the first element found with query `q` once the page has been scrolled enough to be visible in the viewport.
+(location "a#foo") ;=&gt; {:x 240, :y 300}</pre></div><div class="public" id="var-location-once-visible"><h3>location-once-visible</h3><div class="usage"><pre>(location-once-visible q)</pre><pre>(location-once-visible driver q)</pre></div><pre class="doc">Return a map of `:x` and `:y` coordinates for the first element found with query `q` once the page has been scrolled enough to be visible in the viewport.
Examples:
=========
-(location-once-visible "a#foo") ;=&gt; {:x 240, :y 300}</pre></div><div class="public" id="var-multiple%3F"><h3>multiple?</h3><div class="usage"><code>(multiple? q)</code><code>(multiple? driver q)</code></div><pre class="doc">Return true if the first select list found with query `q` allows multiple selections.
+(location-once-visible "a#foo") ;=&gt; {:x 240, :y 300}</pre></div><div class="public" id="var-multiple%3F"><h3>multiple?</h3><div class="usage"><pre>(multiple? q)</pre><pre>(multiple? driver q)</pre></div><pre class="doc">Return true if the first select list found with query `q` allows multiple selections.
Examples:
=========
(multiple? "select.multiple") ;=&gt; true
-(multiple? "select.not-multiple") ;=&gt; false </pre></div><div class="public" id="var-options"><h3>options</h3><div class="usage"><code>(options q)</code><code>(options driver q)</code></div><pre class="doc">Return all option elements within the first select list found with query `q`.
+(multiple? "select.not-multiple") ;=&gt; false </pre></div><div class="public" id="var-options"><h3>options</h3><div class="usage"><pre>(options q)</pre><pre>(options driver q)</pre></div><pre class="doc">Return all option elements within the first select list found with query `q`.
Examples:
=========
-(options "#my-select-list")</pre></div><div class="public" id="var-other-window-handles"><h3>other-window-handles</h3><div class="usage"><code>(other-window-handles)</code><code>(other-window-handles driver)</code></div><pre class="doc">Return a `WindowHandle` for all open windows except the active one.
+(options "#my-select-list")</pre></div><div class="public" id="var-other-window-handles"><h3>other-window-handles</h3><div class="usage"><pre>(other-window-handles)</pre><pre>(other-window-handles driver)</pre></div><pre class="doc">Return a `WindowHandle` for all open windows except the active one.
Examples:
=========
-(other-window-handles)</pre></div><div class="public" id="var-page-source"><h3>page-source</h3><div class="usage"><code>(page-source)</code><code>(page-source driver)</code></div><pre class="doc">Return the source code of the current page in the browser.
+(other-window-handles)</pre></div><div class="public" id="var-page-source"><h3>page-source</h3><div class="usage"><pre>(page-source)</pre><pre>(page-source driver)</pre></div><pre class="doc">Return the source code of the current page in the browser.
Examples:
=========
@@ -497,13 +497,13 @@ Examples:
;;
(let [source (page-source)]
;; do hard-core parsing and manipulation here
- )</pre></div><div class="public" id="var-present%3F"><h3>present?</h3><div class="usage"><code>(present? q)</code><code>(present? driver q)</code></div><pre class="doc">Return true if the first element found with query `q` both exists and is visible on the page.
+ )</pre></div><div class="public" id="var-present%3F"><h3>present?</h3><div class="usage"><pre>(present? q)</pre><pre>(present? driver q)</pre></div><pre class="doc">Return true if the first element found with query `q` both exists and is visible on the page.
Examples:
=========
(present? "div#container") ;=&gt; true
-(present? "a#skip-to-navigation") ;=&gt; false</pre></div><div class="public" id="var-quick-fill"><h3>quick-fill</h3><div class="usage"><code>(quick-fill &amp; query-action-maps)</code></div><pre class="doc">A utility for filling out multiple fields in a form in one go. Returns all the affected elements (if you want a list of unique elements, pass the results through the `distinct` function in clojure.core).
+(present? "a#skip-to-navigation") ;=&gt; false</pre></div><div class="public" id="var-quick-fill"><h3>quick-fill</h3><div class="usage"><pre>(quick-fill &amp; query-action-maps)</pre></div><pre class="doc">A utility for filling out multiple fields in a form in one go. Returns all the affected elements (if you want a list of unique elements, pass the results through the `distinct` function in clojure.core).
`query-action-maps` - a seq of maps of queries to actions (queries find HTML elements, actions are fn's that act on them)
@@ -513,7 +513,7 @@ Examples:
=========
(quick-fill {"#first_name" "Rich"}
- {"a.foo" click})</pre></div><div class="public" id="var-quick-fill-submit"><h3>quick-fill-submit</h3><div class="usage"><code>(quick-fill-submit &amp; query-action-maps)</code></div><pre class="doc">A utility for filling out multiple fields in a form in one go. Always returns nil instead of the affected elements, since on submit all of the elements will be void.
+ {"a.foo" click})</pre></div><div class="public" id="var-quick-fill-submit"><h3>quick-fill-submit</h3><div class="usage"><pre>(quick-fill-submit &amp; query-action-maps)</pre></div><pre class="doc">A utility for filling out multiple fields in a form in one go. Always returns nil instead of the affected elements, since on submit all of the elements will be void.
`query-action-maps` - a seq of maps of queries to actions (queries find HTML elements, actions are fn's that act on them)
@@ -523,51 +523,51 @@ Examples:
=========
(quick-fill {"#first_name" "Rich"}
- {"a.foo" click})</pre></div><div class="public" id="var-quit"><h3>quit</h3><div class="usage"><code>(quit)</code><code>(quit driver)</code></div><pre class="doc">Quit the browser completely, including all open windows.
+ {"a.foo" click})</pre></div><div class="public" id="var-quit"><h3>quit</h3><div class="usage"><pre>(quit)</pre><pre>(quit driver)</pre></div><pre class="doc">Quit the browser completely, including all open windows.
Examples:
=========
-(quit)</pre></div><div class="public" id="var-rectangle"><h3>rectangle</h3><div class="usage"><code>(rectangle q)</code><code>(rectangle driver q)</code></div><pre class="doc">Return a `java.awt.Rectangle` with the position and dimensions of the first element found with query `q` (using the `location` and `size` functions).
+(quit)</pre></div><div class="public" id="var-rectangle"><h3>rectangle</h3><div class="usage"><pre>(rectangle q)</pre><pre>(rectangle driver q)</pre></div><pre class="doc">Return a `java.awt.Rectangle` with the position and dimensions of the first element found with query `q` (using the `location` and `size` functions).
Examples:
=========
-(rectangle "div#login") ;=&gt; #&lt;Rectangle java.awt.Rectangle[x=279,y=132,width=403,height=265]&gt;</pre></div><div class="public" id="var-refresh"><h3>refresh</h3><div class="usage"><code>(refresh)</code><code>(refresh driver)</code></div><pre class="doc">Refresh the current page in the browser. Note that all references to elements will become "stale" and unusable after a page refresh.
+(rectangle "div#login") ;=&gt; #&lt;Rectangle java.awt.Rectangle[x=279,y=132,width=403,height=265]&gt;</pre></div><div class="public" id="var-refresh"><h3>refresh</h3><div class="usage"><pre>(refresh)</pre><pre>(refresh driver)</pre></div><pre class="doc">Refresh the current page in the browser. Note that all references to elements will become "stale" and unusable after a page refresh.
Examples:
=========
-(refresh)</pre></div><div class="public" id="var-select"><h3>select</h3><div class="usage"><code>(select q)</code><code>(select driver q)</code></div><pre class="doc">If the first form element found with query `q` is not selected, click the element to select it. Otherwise, do nothing and just return the element found.
+(refresh)</pre></div><div class="public" id="var-select"><h3>select</h3><div class="usage"><pre>(select q)</pre><pre>(select driver q)</pre></div><pre class="doc">If the first form element found with query `q` is not selected, click the element to select it. Otherwise, do nothing and just return the element found.
Examples:
=========
(select "input.already-selected") ;=&gt; do nothing
-(select "input.not-selected") ;=&gt; click</pre></div><div class="public" id="var-select-all"><h3>select-all</h3><div class="usage"><code>(select-all q)</code><code>(select-all driver q)</code></div><pre class="doc">Select all options within the first select list found with query `q`.
+(select "input.not-selected") ;=&gt; click</pre></div><div class="public" id="var-select-all"><h3>select-all</h3><div class="usage"><pre>(select-all q)</pre><pre>(select-all driver q)</pre></div><pre class="doc">Select all options within the first select list found with query `q`.
Examples:
=========
-(deselect-all "#my-select-list")</pre></div><div class="public" id="var-select-by-index"><h3>select-by-index</h3><div class="usage"><code>(select-by-index q idx)</code><code>(select-by-index driver q idx)</code></div><pre class="doc">Select the option element at index `idx` (zero-based) within the first select list found with query `q`.
+(deselect-all "#my-select-list")</pre></div><div class="public" id="var-select-by-index"><h3>select-by-index</h3><div class="usage"><pre>(select-by-index q idx)</pre><pre>(select-by-index driver q idx)</pre></div><pre class="doc">Select the option element at index `idx` (zero-based) within the first select list found with query `q`.
Examples:
=========
;;
;; Select by index, select 2nd element
;;
-(select-by-index "#my-select-list" 1)</pre></div><div class="public" id="var-select-by-text"><h3>select-by-text</h3><div class="usage"><code>(select-by-text q text)</code><code>(select-by-text driver q text)</code></div><pre class="doc">Select the option element with visible text `text` within the first select list found with query `q`.
+(select-by-index "#my-select-list" 1)</pre></div><div class="public" id="var-select-by-text"><h3>select-by-text</h3><div class="usage"><pre>(select-by-text q text)</pre><pre>(select-by-text driver q text)</pre></div><pre class="doc">Select the option element with visible text `text` within the first select list found with query `q`.
Examples:
=========
-(select-by-text "#my-select-list" "foo")</pre></div><div class="public" id="var-select-by-value"><h3>select-by-value</h3><div class="usage"><code>(select-by-value q value)</code><code>(select-by-value driver q value)</code></div><pre class="doc">Deselect the option element with `value` within the first select list found with query `q`.
+(select-by-text "#my-select-list" "foo")</pre></div><div class="public" id="var-select-by-value"><h3>select-by-value</h3><div class="usage"><pre>(select-by-value q value)</pre><pre>(select-by-value driver q value)</pre></div><pre class="doc">Deselect the option element with `value` within the first select list found with query `q`.
Examples:
=========
-(deselect-by-value "#my-select-list" "foo")</pre></div><div class="public" id="var-select-option"><h3>select-option</h3><div class="usage"><code>(select-option q attr-val)</code><code>(select-option driver q attr-val)</code></div><pre class="doc">Select the option element matching `attr-val` within the first select list found with query `q`.
+(deselect-by-value "#my-select-list" "foo")</pre></div><div class="public" id="var-select-option"><h3>select-option</h3><div class="usage"><pre>(select-option q attr-val)</pre><pre>(select-option driver q attr-val)</pre></div><pre class="doc">Select the option element matching `attr-val` within the first select list found with query `q`.
The `attr-val` can contain `:index`, `:value`, or `:text` keys to find the target option element. Index is the zero-based order of the option element in the list, value is the value of the HTML value attribute, and text is the visible text of the option element on the page.
@@ -587,23 +587,23 @@ Examples:
;;
;; By visible text of option element
;;
-(select-option "#my-select-list" {:value "Foo"})</pre></div><div class="public" id="var-selected-options"><h3>selected-options</h3><div class="usage"><code>(selected-options q)</code><code>(selected-options driver q)</code></div><pre class="doc">Return all selected option elements within the first select list found with query `q`.
+(select-option "#my-select-list" {:value "Foo"})</pre></div><div class="public" id="var-selected-options"><h3>selected-options</h3><div class="usage"><pre>(selected-options q)</pre><pre>(selected-options driver q)</pre></div><pre class="doc">Return all selected option elements within the first select list found with query `q`.
Examples:
=========
-(selected-options "#my-select-list")</pre></div><div class="public" id="var-selected%3F"><h3>selected?</h3><div class="usage"><code>(selected? q)</code><code>(selected? driver q)</code></div><pre class="doc">Return true if the first element found with the query `q` is selected (works for radio buttons, checkboxes, and option tags within select lists).
+(selected-options "#my-select-list")</pre></div><div class="public" id="var-selected%3F"><h3>selected?</h3><div class="usage"><pre>(selected? q)</pre><pre>(selected? driver q)</pre></div><pre class="doc">Return true if the first element found with the query `q` is selected (works for radio buttons, checkboxes, and option tags within select lists).
Examples:
=========
(selected? "input[type='radio'][value='foo']") ;=&gt; true
-(selected? "option[value='foo']") ;=&gt; false </pre></div><div class="public" id="var-send-keys"><h3>send-keys</h3><div class="usage"><code>(send-keys q s)</code><code>(send-keys driver q s)</code></div><pre class="doc">Type the string `s` into the first form element found with query `q`.
+(selected? "option[value='foo']") ;=&gt; false </pre></div><div class="public" id="var-send-keys"><h3>send-keys</h3><div class="usage"><pre>(send-keys q s)</pre><pre>(send-keys driver q s)</pre></div><pre class="doc">Type the string `s` into the first form element found with query `q`.
Examples:
=========
-(input-text "input#login_field" "semperos")</pre></div><div class="public" id="var-set-driver%21"><h3>set-driver!</h3><div class="usage"><code>(set-driver! browser-spec)</code><code>(set-driver! browser-spec url)</code></div><pre class="doc">Set a default `Driver` for this thread, optionally sending it to a starting `url`.
+(input-text "input#login_field" "semperos")</pre></div><div class="public" id="var-set-driver%21"><h3>set-driver!</h3><div class="usage"><pre>(set-driver! browser-spec)</pre><pre>(set-driver! browser-spec url)</pre></div><pre class="doc">Set a default `Driver` for this thread, optionally sending it to a starting `url`.
Available browsers are `:firefox`, `:chrome`, `:ie`, `:opera`, and `:htmlunit`.
@@ -627,7 +627,7 @@ Examples:
;;
;; Use existing Driver record
;;
-(set-driver! a-driver)</pre></div><div class="public" id="var-set-finder%21"><h3>set-finder!</h3><div class="usage"><code>(set-finder! finder-fn)</code></div><pre class="doc">Set a default finder function, which will be used with all `q` parameters in functions that require an Element.
+(set-driver! a-driver)</pre></div><div class="public" id="var-set-finder%21"><h3>set-finder!</h3><div class="usage"><pre>(set-finder! finder-fn)</pre></div><pre class="doc">Set a default finder function, which will be used with all `q` parameters in functions that require an Element.
Examples:
=========
@@ -670,39 +670,39 @@ Examples:
;; `find-elements-by`, `by-css` and `by-xpath`. The maps `{:css "query"}` and
;; `{:xpath "query"}` are themselves acceptable arguments to the `find-elements`,
;; function, so that function could have been used instead without the `case` statement.)
-;;</pre></div><div class="public" id="var-size"><h3>size</h3><div class="usage"><code>(size q)</code><code>(size driver q)</code></div><pre class="doc">Return the size of the first element found with query `q` in pixels as a map of `:width` and `:height`..
+;;</pre></div><div class="public" id="var-size"><h3>size</h3><div class="usage"><pre>(size q)</pre><pre>(size driver q)</pre></div><pre class="doc">Return the size of the first element found with query `q` in pixels as a map of `:width` and `:height`..
Examples:
=========
-(size "div#container") ;=&gt; {:width 960, :height 2000} </pre></div><div class="public" id="var-submit"><h3>submit</h3><div class="usage"><code>(submit q)</code><code>(submit driver q)</code></div><pre class="doc">Submit the form that the first form element found with query `q` belongs to (this is equivalent to pressing ENTER in a text field while filling out a form).
+(size "div#container") ;=&gt; {:width 960, :height 2000} </pre></div><div class="public" id="var-submit"><h3>submit</h3><div class="usage"><pre>(submit q)</pre><pre>(submit driver q)</pre></div><pre class="doc">Submit the form that the first form element found with query `q` belongs to (this is equivalent to pressing ENTER in a text field while filling out a form).
Examples:
=========
-(submit "input#password")</pre></div><div class="public" id="var-switch-to-active"><h3>switch-to-active</h3><div class="usage"><code>(switch-to-active)</code><code>(switch-to-active driver)</code></div><pre class="doc">Switch to the page element that currently has focus, or to the body if this cannot be detected.
+(submit "input#password")</pre></div><div class="public" id="var-switch-to-active"><h3>switch-to-active</h3><div class="usage"><pre>(switch-to-active)</pre><pre>(switch-to-active driver)</pre></div><pre class="doc">Switch to the page element that currently has focus, or to the body if this cannot be detected.
Examples:
=========
-(switch-to-active)</pre></div><div class="public" id="var-switch-to-default"><h3>switch-to-default</h3><div class="usage"><code>(switch-to-default)</code><code>(switch-to-default driver)</code></div><pre class="doc">Switch focus to the first first frame of the page, or the main document if the page contains iframes.
+(switch-to-active)</pre></div><div class="public" id="var-switch-to-default"><h3>switch-to-default</h3><div class="usage"><pre>(switch-to-default)</pre><pre>(switch-to-default driver)</pre></div><pre class="doc">Switch focus to the first first frame of the page, or the main document if the page contains iframes.
Examples:
=========
-(switch-to-default)</pre></div><div class="public" id="var-switch-to-frame"><h3>switch-to-frame</h3><div class="usage"><code>(switch-to-frame frame-q)</code><code>(switch-to-frame driver frame-q)</code></div><pre class="doc">Switch focus to the frame found by the finder query `frame-q`.
+(switch-to-default)</pre></div><div class="public" id="var-switch-to-frame"><h3>switch-to-frame</h3><div class="usage"><pre>(switch-to-frame frame-q)</pre><pre>(switch-to-frame driver frame-q)</pre></div><pre class="doc">Switch focus to the frame found by the finder query `frame-q`.
If you need the default behavior of `.frame()`, you can use clj-webdriver.core/switch-to-frame. For that function, you can pass either a number (the index of the frame on the page), a string (the `name` or `id` attribute of the target frame), or an `Element` of the frame.
Examples:
=========
-(switch-to-frame "#target-frame")</pre></div><div class="public" id="var-switch-to-other-window"><h3>switch-to-other-window</h3><div class="usage"><code>(switch-to-other-window)</code><code>(switch-to-other-window driver)</code></div><pre class="doc">If two windows are open, switch focus to the other.
+(switch-to-frame "#target-frame")</pre></div><div class="public" id="var-switch-to-other-window"><h3>switch-to-other-window</h3><div class="usage"><pre>(switch-to-other-window)</pre><pre>(switch-to-other-window driver)</pre></div><pre class="doc">If two windows are open, switch focus to the other.
Examples:
=========
-(switch-to-other-window)</pre></div><div class="public" id="var-switch-to-window"><h3>switch-to-window</h3><div class="usage"><code>(switch-to-window handle)</code><code>(switch-to-window driver handle)</code></div><pre class="doc">Switch focus to the window for the given one of the following:
+(switch-to-other-window)</pre></div><div class="public" id="var-switch-to-window"><h3>switch-to-window</h3><div class="usage"><pre>(switch-to-window handle)</pre><pre>(switch-to-window driver handle)</pre></div><pre class="doc">Switch focus to the window for the given one of the following:
* A string representing the target window name (as seen in the application titlebar)
* A number representing the index (order) of the target window
@@ -724,12 +724,12 @@ Examples:
;;
;; Passing a `WindowHandle` record directly (as returned by the `window-handle` function)
;;
-(switch-to-window a-window-handle)</pre></div><div class="public" id="var-tag"><h3>tag</h3><div class="usage"><code>(tag q)</code><code>(tag driver q)</code></div><pre class="doc">Return the HTML tag for the first element found with query `q`.
+(switch-to-window a-window-handle)</pre></div><div class="public" id="var-tag"><h3>tag</h3><div class="usage"><pre>(tag q)</pre><pre>(tag driver q)</pre></div><pre class="doc">Return the HTML tag for the first element found with query `q`.
Examples:
=========
-(tag "#foo") ;=&gt; "a"</pre></div><div class="public" id="var-take-screenshot"><h3>take-screenshot</h3><div class="usage"><code>(take-screenshot)</code><code>(take-screenshot format)</code><code>(take-screenshot format destination)</code><code>(take-screenshot driver format destination)</code></div><pre class="doc">Take a screenshot of the browser's current page, optionally specifying the format (`:file`, `:base64`, or `:bytes`) and the `destination` (something that `clojure.java.io/file` will accept).
+(tag "#foo") ;=&gt; "a"</pre></div><div class="public" id="var-take-screenshot"><h3>take-screenshot</h3><div class="usage"><pre>(take-screenshot)</pre><pre>(take-screenshot format)</pre><pre>(take-screenshot format destination)</pre><pre>(take-screenshot driver format destination)</pre></div><pre class="doc">Take a screenshot of the browser's current page, optionally specifying the format (`:file`, `:base64`, or `:bytes`) and the `destination` (something that `clojure.java.io/file` will accept).
Examples:
=========
@@ -744,17 +744,17 @@ Examples:
;;
;; Specify a default destination for the file object
;;
-(take-screenshot :file "/path/to/save/screenshot.png")</pre></div><div class="public" id="var-text"><h3>text</h3><div class="usage"><code>(text q)</code><code>(text driver q)</code></div><pre class="doc">Return the text within the first element found with query `q`.
+(take-screenshot :file "/path/to/save/screenshot.png")</pre></div><div class="public" id="var-text"><h3>text</h3><div class="usage"><pre>(text q)</pre><pre>(text driver q)</pre></div><pre class="doc">Return the text within the first element found with query `q`.
Examples:
=========
-(text "#message") ;=&gt; "An error occurred."</pre></div><div class="public" id="var-title"><h3>title</h3><div class="usage"><code>(title)</code><code>(title driver)</code></div><pre class="doc">Return the title of the current page in the browser.
+(text "#message") ;=&gt; "An error occurred."</pre></div><div class="public" id="var-title"><h3>title</h3><div class="usage"><pre>(title)</pre><pre>(title driver)</pre></div><pre class="doc">Return the title of the current page in the browser.
Examples:
=========
-(title)</pre></div><div class="public" id="var-to"><h3>to</h3><div class="usage"><code>(to url)</code><code>(to driver url)</code></div><pre class="doc">Navigate the browser to `url`.
+(title)</pre></div><div class="public" id="var-to"><h3>to</h3><div class="usage"><pre>(to url)</pre><pre>(to driver url)</pre></div><pre class="doc">Navigate the browser to `url`.
Examples:
=========
@@ -771,23 +771,23 @@ Examples:
[path]
(let [base-url "http://example.com/"]
(to (str base-url path))))
-;; (go "test-page") would navigate to "http://example.com/test-page"</pre></div><div class="public" id="var-toggle"><h3>toggle</h3><div class="usage"><code>(toggle q)</code><code>(toggle driver q)</code></div><pre class="doc">Toggle is a synonym for click. Click the first element found with query `q`.
+;; (go "test-page") would navigate to "http://example.com/test-page"</pre></div><div class="public" id="var-toggle"><h3>toggle</h3><div class="usage"><pre>(toggle q)</pre><pre>(toggle driver q)</pre></div><pre class="doc">Toggle is a synonym for click. Click the first element found with query `q`.
Examples:
=========
-(toggle "input[type='checkbox'][value='foo']")</pre></div><div class="public" id="var-value"><h3>value</h3><div class="usage"><code>(value q)</code><code>(value driver q)</code></div><pre class="doc">Return the value of the HTML value attribute for the first element found with query `q`. The is identical to `(attribute q :value)`
+(toggle "input[type='checkbox'][value='foo']")</pre></div><div class="public" id="var-value"><h3>value</h3><div class="usage"><pre>(value q)</pre><pre>(value driver q)</pre></div><pre class="doc">Return the value of the HTML value attribute for the first element found with query `q`. The is identical to `(attribute q :value)`
Examples:
=========
-(value "#my-button") ;=&gt; "submit" </pre></div><div class="public" id="var-visible%3F"><h3>visible?</h3><div class="usage"><code>(visible? q)</code><code>(visible? driver q)</code></div><pre class="doc">Return true if the first element found with query `q` is visible on the current page in the browser.
+(value "#my-button") ;=&gt; "submit" </pre></div><div class="public" id="var-visible%3F"><h3>visible?</h3><div class="usage"><pre>(visible? q)</pre><pre>(visible? driver q)</pre></div><pre class="doc">Return true if the first element found with query `q` is visible on the current page in the browser.
Examples:
=========
(visible? "div#container") ;=&gt; true
-(visible? "a.hidden") ;=&gt; false</pre></div><div class="public" id="var-wait-until"><h3>wait-until</h3><div class="usage"><code>(wait-until pred)</code><code>(wait-until pred timeout)</code><code>(wait-until pred timeout interval)</code><code>(wait-until driver pred timeout interval)</code></div><pre class="doc">Make the browser wait until the predicate `pred` returns true, providing an optional `timeout` in milliseconds and an optional `interval` in milliseconds on which to attempt the predicate. If the timeout is exceeded, an exception is thrown.
+(visible? "a.hidden") ;=&gt; false</pre></div><div class="public" id="var-wait-until"><h3>wait-until</h3><div class="usage"><pre>(wait-until pred)</pre><pre>(wait-until pred timeout)</pre><pre>(wait-until pred timeout interval)</pre><pre>(wait-until driver pred timeout interval)</pre></div><pre class="doc">Make the browser wait until the predicate `pred` returns true, providing an optional `timeout` in milliseconds and an optional `interval` in milliseconds on which to attempt the predicate. If the timeout is exceeded, an exception is thrown.
The predicate is a function that accepts the browser `Driver` record as its single parameter, and should return a truthy/falsey value.
@@ -807,17 +807,17 @@ Examples:
;;
(... code to load page ...)
(wait-until #(exists? "#foo"))
-(click "#foo a.bar")</pre></div><div class="public" id="var-window-handle"><h3>window-handle</h3><div class="usage"><code>(window-handle)</code><code>(window-handle driver)</code></div><pre class="doc">Return a `WindowHandle` that contains information about the active window and can be used for switching.
+(click "#foo a.bar")</pre></div><div class="public" id="var-window-handle"><h3>window-handle</h3><div class="usage"><pre>(window-handle)</pre><pre>(window-handle driver)</pre></div><pre class="doc">Return a `WindowHandle` that contains information about the active window and can be used for switching.
Examples:
=========
-(window-handle)</pre></div><div class="public" id="var-window-handles"><h3>window-handles</h3><div class="usage"><code>(window-handles)</code><code>(window-handles driver)</code></div><pre class="doc">Return `WindowHandle` records as a seq for all open windows.
+(window-handle)</pre></div><div class="public" id="var-window-handles"><h3>window-handles</h3><div class="usage"><pre>(window-handles)</pre><pre>(window-handles driver)</pre></div><pre class="doc">Return `WindowHandle` records as a seq for all open windows.
Examples:
=========
-(window-handles)</pre></div><div class="public" id="var-with-driver"><h3>with-driver</h3><div class="usage"><code>(with-driver browser-spec &amp; body)</code></div><pre class="doc">Given a `browser-spec` to start a browser, execute the forms in `body`, then call `quit` on the browser. Uses the default finder function.
+(window-handles)</pre></div><div class="public" id="var-with-driver"><h3>with-driver</h3><div class="usage"><pre>(with-driver browser-spec &amp; body)</pre></div><pre class="doc">Given a `browser-spec` to start a browser, execute the forms in `body`, then call `quit` on the browser. Uses the default finder function.
Examples:
=========
@@ -832,7 +832,7 @@ Examples:
(input-text "#login_field" "your_username")
(-&gt; "#password"
(input-text "your_password")
- submit))</pre></div><div class="public" id="var-with-driver-fn"><h3>with-driver-fn</h3><div class="usage"><code>(with-driver-fn browser-spec finder-fn &amp; body)</code></div><pre class="doc">Given a `browser-spec` to start a browser and a `finder-fn` to use as a finding function, execute the forms in `body`, then call `quit` on the browser.
+ submit))</pre></div><div class="public" id="var-with-driver-fn"><h3>with-driver-fn</h3><div class="usage"><pre>(with-driver-fn browser-spec finder-fn &amp; body)</pre></div><pre class="doc">Given a `browser-spec` to start a browser and a `finder-fn` to use as a finding function, execute the forms in `body`, then call `quit` on the browser.
Examples:
=========
@@ -847,11 +847,11 @@ Examples:
(input-text "//input[@id='login_field']" "your_username")
(-&gt; "//input[@id='password']"
(input-text "your_password")
- submit))</pre></div><div class="public" id="var-xpath"><h3>xpath</h3><div class="usage"><code>(xpath q)</code><code>(xpath driver q)</code></div><pre class="doc">Return an absolute XPath path for the first element found with query `q`. NOTE: This function relies on executing JavaScript in the browser, and is therefore not as dependable as other functions.
+ submit))</pre></div><div class="public" id="var-xpath"><h3>xpath</h3><div class="usage"><pre>(xpath q)</pre><pre>(xpath driver q)</pre></div><pre class="doc">Return an absolute XPath path for the first element found with query `q`. NOTE: This function relies on executing JavaScript in the browser, and is therefore not as dependable as other functions.
Examples:
=========
-(xpath "#login_field") ;=&gt; "/html/body/div[2]/div/div/form/div[2]/label/input"</pre></div><div class="public" id="var-xpath-finder"><h3>xpath-finder</h3><div class="usage"><code>(xpath-finder q)</code><code>(xpath-finder driver q)</code></div><pre class="doc">Given a XPath query `q`, return a lazy seq of the elements found by calling `find-elements` with `by-xpath`. If `q` is an `Element`, it is returned unchanged.
+(xpath "#login_field") ;=&gt; "/html/body/div[2]/div/div/form/div[2]/label/input"</pre></div><div class="public" id="var-xpath-finder"><h3>xpath-finder</h3><div class="usage"><pre>(xpath-finder q)</pre><pre>(xpath-finder driver q)</pre></div><pre class="doc">Given a XPath query `q`, return a lazy seq of the elements found by calling `find-elements` with `by-xpath`. If `q` is an `Element`, it is returned unchanged.
This function is used internally by the Taxi API as `*finder*`. See the documentation for `set-finder!` for examples of extending this function or creating your own custom finder function.</pre></div></div>
Something went wrong with that request. Please try again.