Liking cljdoc? Tell your friends :D

webdriver.core


alert-acceptclj

(alert-accept driver)

accepts alert

accepts alert
raw docstring

alert-dismissclj

(alert-dismiss driver)

dismisses an alert

dismisses an alert
raw docstring

alert-textclj

(alert-text driver)

returns the text contained in a js alert box

returns the text contained in a js alert box
raw docstring

attrclj

(attr webelement attribute)
(attr driver lookup-type lookup-string attribute)

returns the value of an element's attribute

returns the value of an element's attribute
raw docstring

byclj

(by lookup-type lookup-string)

Returns a By object. Used for element queries

Returns a By object. Used for element queries
raw docstring

clearclj

(clear driver webelement)
(clear driver lookup-type lookup-string)

clears webelement

clears webelement
raw docstring

clickclj

(click webelement)
(click driver webelement)
(click driver lookup-type & lookup-strings)

clicks an element

clicks an element
raw docstring

(cookie driver cookie-name)
(cookie driver cookie-name cookie-value)

Creates or retrieves a cookie named cookie-name. Sets cookie's value to cookie-value if provided

Creates or retrieves a cookie named cookie-name.
Sets cookie's value to cookie-value if provided
raw docstring

create-driverclj

(create-driver driver-type)
(create-driver driver-type args)

creates a chrome or firefox driver based on passing in :chrome or :firefox. args would be a verctor for command line arguments like ["--headless"]

creates a chrome or firefox driver based on passing in :chrome or :firefox.
args would be a verctor for command line arguments like ["--headless"]
raw docstring

cssclj

(css webelement attribute)
(css driver lookup-type lookup-string attribute)

returns the value of a webelement's css value attribute

returns the value of a webelement's css value attribute
raw docstring

delete-elmclj

(delete-elm driver elm)
(delete-elm driver lookup-type lookup-string)

driver-quitclj

(driver-quit driver)

calls quit on driver

calls quit on driver
raw docstring

enabled?clj

(enabled? elm)
(enabled? driver lookup-type lookup-string)

execute-scriptclj

(execute-script webdriver js & js-args)

Executes js in webdriver

Executes js in webdriver
raw docstring

focused-elementclj

(focused-element driver)

get-elementclj

(get-element driver lookup-type lookup-string)

returns the first element matching lookup-type and lookup-string

returns the first element matching lookup-type and lookup-string
raw docstring

get-element-valueclj

(get-element-value webelement attribute)
(get-element-value driver lookup-type lookup-string attribute)

gets the value of an element. :text for text and :value for value

gets the value of an element.
:text for text and :value for value
raw docstring

get-elementsclj

(get-elements driver lookup-type lookup-string)

finds elements that match lookup-type and lookup-string and returns a vector of those WebElements

finds elements that match lookup-type and lookup-string and returns a vector of those WebElements
raw docstring

get-visible-elementclj

(get-visible-element driver lookup-type lookup-string)

returns the first visible elmeent matching lookip-type and lookup-string

returns the first visible elmeent matching lookip-type and lookup-string
raw docstring

htmlclj

(html options & content)

A wrapper around hiccup's html macro to avoid requiring yet another require

A wrapper around hiccup's html macro to avoid requiring yet another require
raw docstring

iframeclj

(iframe driver n)
(iframe driver lookup-type lookup-string)

switches to iframe by index or webelement (via calling (get-element lookup-type lookup-string))

switches to iframe by index or webelement (via calling (get-element lookup-type lookup-string))
raw docstring

iframe-defaultclj

(iframe-default driver)

switches to default content (main body of the html that contains all the iframes)

switches to default content (main body of the html that contains all the iframes)
raw docstring

iframe-parentclj

(iframe-parent driver)

switches to parent iframe

switches to parent iframe
raw docstring

implicit-waitclj

(implicit-wait driver timeout)

sets driver's implicit wait timeout (in seconds)

sets driver's implicit wait timeout (in seconds)
raw docstring

input-textclj

(input-text driver webelement s clear-element)

sets the value of a text input. If clear-element, element will be cleared before setting the text input

sets the value of a text input. If clear-element, element will be cleared before
setting the text input
raw docstring

insert-htmlclj

(insert-html driver elm html)

Appends given html to elm.. elm is the parent and html will be the child

Appends given html to elm.. elm is the parent and html will be the child
raw docstring

is-visibleclj

(is-visible element)
(is-visible driver lookup-type lookup-string)

Returns true if element is visible and enabled

Returns true if element is visible and enabled
raw docstring

optionsclj

(options elm)
(options driver lookup-type lookup-string)

returns a vector of the options available to elm. returns nil if elm is not a select element.

returns a vector of the options available to elm.
returns nil if elm is not a select element.
raw docstring

parentclj

(parent e)
(parent driver lookup-type lookup-string)

returns the parent of e

returns the parent of e
raw docstring

post-sibclj

(post-sib e)
(post-sib driver lookup-type lookup-string)

returns a coll containing the following sibling elements of e

returns a coll containing the following sibling elements of e
raw docstring

pre-sibclj

(pre-sib e)
(pre-sib driver lookup-type lookup-string)

returns a coll containing the preceding sibling elements of e

returns a coll containing the preceding sibling elements of e
raw docstring

qclj

(q driver s)

Finds and returns webelement with name, id, tagName, className, linkText, text, or xpath. Note: not great to use if using implicit waits.

Finds and returns webelement with name, id, tagName, className, linkText, text, or xpath.
Note: not great to use if using implicit waits.
raw docstring

screen-shotclj

(screen-shot driver output)

scroll-into-viewclj

(scroll-into-view driver webelement)
(scroll-into-view driver lookup-type lookup-string)

scrolls webelemnt into view

scrolls webelemnt into view
raw docstring

select-elmclj

(select-elm e)
(select-elm driver lookup-type lookup-string)

select-elm-valclj

(select-elm-val e)
(select-elm-val driver lookup-type lookup-string)

send-keysclj

(send-keys element s)

sends element the keys found in str s

sends element the keys found in str s
raw docstring

set-elementclj

(set-element driver e s)
(set-element driver lookup-type lookup-string s)

sets element e to value s. For select or input elements

sets element e to value s. For select or input elements
raw docstring

set-elementsclj

(set-elements driver e v)
(set-elements driver lookup-type lookup-strings values)

sets coll of elements e to coll of values v

sets coll of elements e to coll of values v
raw docstring

set-elmsclj

(set-elms driver coll)
(set-elms driver lookup-type coll)

partitions coll into lists of 2 each list becomes a key value pair where key is an element identifier and value is the value that element will be set to Eg: (set-elms driver :id [:input1 "hello" :input2 "world"]) if you pass in only a driver and coll, every odd element should be an WebElement

partitions coll into lists of 2
each list becomes a key value pair where key is an element identifier
and value is the value that element will be set to
Eg: (set-elms driver :id [:input1 "hello" :input2 "world"])
if you pass in only a driver and coll, every odd element should be an WebElement
raw docstring

set-file-inputclj

(set-file-input element s)

Sets file input's path

Sets file input's path
raw docstring

siblingsclj

(siblings e)
(siblings driver lookup-type lookup-string)

returns a map containing colls with the :preceding and :following sibling elements of e

returns a map containing colls with the :preceding and :following
sibling elements of e
raw docstring

switch-to-alertclj

(switch-to-alert driver)

toclj

(to driver url)

Navigates driver to the given url

Navigates driver to the given url
raw docstring

to-localhostclj

(to-localhost driver)

Navigate driver to localhost, ignoring thrown exceptions

Navigate driver to localhost, ignoring thrown exceptions
raw docstring

transitionend-jsclj


try-clickclj

(try-click driver lookup-type lookup-string)
(try-click driver lookup-type lookup-string timeout)

repeatedly trys to click webelement until no exception occurs or the timeout (seconds) expires

repeatedly trys to click webelement until no exception occurs or
the timeout (seconds) expires
raw docstring

unfocusclj

(unfocus driver)

unfocuses all elements

unfocuses all elements
raw docstring

visible?clj

(visible? elm)
(visible? driver lookup-type lookup-string)

Returns true if element is visible

Returns true if element is visible
raw docstring

wait-clickclj

(wait-click driver lookup-type lookup-string)
(wait-click driver lookup-type lookup-string timeout)

waits with timeout (seconds) for element then clicks

waits with timeout (seconds) for element then clicks
raw docstring

wait-elm-domclj

(wait-elm-dom driver lookup-type lookup-string)
(wait-elm-dom driver lookup-type lookup-string max-wait)

Waits for element to exist in dom with a timeout of max-wait (seconds)

Waits for element to exist in dom with a timeout of max-wait (seconds)
raw docstring

wait-for-elementclj

(wait-for-element driver lookup-type lookup-string)
(wait-for-element driver lookup-type lookup-string max-wait)
(wait-for-element driver lookup-type lookup-string max-wait poll-interval)

Explicitly waits for element to be clickable with a timeout of max-wait (seconds) and a poll-interval (milliseconds)

Explicitly waits for element to be clickable with a timeout of max-wait (seconds)
and a poll-interval (milliseconds)
raw docstring

wait-for-transclj

(wait-for-trans driver elm f)
(wait-for-trans driver elm timeout f)
(wait-for-trans driver elm timeout expected-transitions f)

waits for transitions of elm triggered by f to finish. timeout (milliseconds) should be longer than elm's transition duration expected-transitions is an int that should represent the number of transitions elm will go through when trigger f is executed

waits for transitions of elm triggered by f to finish.
timeout (milliseconds) should be longer than elm's transition duration
expected-transitions is an int that should represent the number of transitions elm
will go through when trigger f is executed
raw docstring

wait-qclj

(wait-q driver lookup-type lookup-string)
(wait-q driver lookup-type lookup-string timeout)
(wait-q driver lookup-type lookup-string timeout require-visible)

returns a list of elements. Does not return elements until the query contains visible elements require-visible determines if the final seq returned are only visible elements matching the query

returns a list of elements.
Does not return elements until the query contains visible elements
require-visible determines if the final seq returned are only visible
elements matching the query
raw docstring

with-all-driverscljmacro

(with-all-drivers driver-args & body)

Same as with-driver but evaluates the forms in body agains all supported driver types. See examples in the unit tests

Same as with-driver but evaluates the forms in body agains all supported driver types.
See examples in the unit tests
raw docstring

with-drivercljmacro

(with-driver driver-type driver-args & body)

creates a driver, executes the forms in body, and closes the driver. driver is closed in the case of an exception

creates a driver, executes the forms in body, and closes the driver.
driver is closed in the case of an exception
raw docstring

with-webdrivercljmacro

(with-webdriver [driver &
                 {:keys [driver-type driver-args]
                  :as params
                  :or {driver-args [] driver-type :chrome}}]
                &
                body)

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

× close