Liking cljdoc? Tell your friends :D

sparkledriver.browser


accept-alert!clj

(accept-alert! alert)

Accept an alert.

Accept an alert.
sourceraw docstring

all-windowsclj

(all-windows browser)

Return a set of handles for all browser windows.

Return a set of handles for all `browser` windows.
sourceraw docstring

attachments-dirclj

(attachments-dir browser)

Return the path to the directory where the browser is storing attachment files.

Return the path to the directory where the browser is storing attachment files.
sourceraw docstring

available-log-typesclj

(available-log-types browser)

Return a set of strings representing the types of logs available for browser. N.B. browser must have been initialized with some kind of logging enabled, for isntance :log-trace or :log-wire.

Return a set of strings representing the types of logs available for `browser`. N.B. `browser` must have been initialized with some kind of logging enabled, for isntance :log-trace or :log-wire.
sourceraw docstring

browser-optionsclj

The possible options for building a browser instance in {:option [default setter-fn]} format.

The possible options for building a browser instance in {:option [default setter-fn]} format.
sourceraw docstring

cache-dirclj

(cache-dir browser)

Return the path to the directory where the browser is storing cached files.

Return the path to the directory where the browser is storing cached files.
sourceraw docstring

close-browser!clj

(close-browser! browser)

Close a browser instance, killing the underlying subprocess and freeing all resources.

Close a browser instance, killing the underlying subprocess and freeing all resources.
sourceraw docstring

current-urlclj

(current-url browser)

Return the currently visited url of browser.

Return the currently visited url of `browser`.
sourceraw docstring

current-windowclj

(current-window browser)

Return a handle for the currently active browser window.

Return a handle for the currently active `browser` window.
sourceraw docstring

dismiss-alert!clj

(dismiss-alert! alert)

Dismisses an alert.

Dismisses an alert.
sourceraw docstring

execute-scriptclj

(execute-script browser script & arguments)

Executes JavaScript script in the context of the currently selected frame or window of browser with arguments.

Executes JavaScript `script` in the context of the currently selected frame or window of `browser` with `arguments`.
sourceraw docstring

execute-script-asyncclj

(execute-script-async browser script & arguments)

Asynchronously execute JavaScript script in the context of the currently selected frame or window of browser with arguments.

Asynchronously execute JavaScript `script` in the context of the currently selected frame or window of `browser` with `arguments`.
sourceraw docstring

fetch!clj

(fetch! browser url)

Fetch 'url' using 'browser' and return browser after loading is complete.

  (fetch! browser "http://www.clojure.com/")
  ;;=> returns browser after navigating to the clojure site
Fetch 'url' using 'browser' and return browser after loading is complete.

```clojure
  (fetch! browser "http://www.clojure.com/")
  ;;=> returns browser after navigating to the clojure site
```
sourceraw docstring

logsclj

(logs browser & kind)

Return browser's logs of whatever kind, or all if not specified. See http://machinepublishers.github.io/jBrowserDriver/org/openqa/selenium/logging/LogEntry.html for details of the returned items. Example:

  (map #(.getMessage %) (logs browser))
  ;;=> events that have occurred since the last time you did this
Return `browser`'s logs of whatever `kind`, or all if not specified. See http://machinepublishers.github.io/jBrowserDriver/org/openqa/selenium/logging/LogEntry.html for details of the returned items. Example:

```
  (map #(.getMessage %) (logs browser))
  ;;=> events that have occurred since the last time you did this
```
sourceraw docstring

make-browserclj

(make-browser & options)

Creates a new headless browser instance parameterized by options. Examples:

  (make-browser :log-wire true)  ; log network traffic

  (make-browser :ajax-wait 1000) ; wait 1000ms for JS to run after page load

  (make-browser :headless false) ; pop up a browser window to watch it work
Creates a new headless browser instance parameterized by `options`. Examples:

```clojure
  (make-browser :log-wire true)  ; log network traffic

  (make-browser :ajax-wait 1000) ; wait 1000ms for JS to run after page load

  (make-browser :headless false) ; pop up a browser window to watch it work
```
  
sourceraw docstring

maximize-windowclj

(maximize-window browser)

Maximize browser's currently focused window.

Maximize `browser`'s currently focused window.
sourceraw docstring

media-dirclj

(media-dir browser)

Return the path to the directory where the browser is storing media files.

Return the path to the directory where the browser is storing media files.
sourceraw docstring

page-sourceclj

(page-source browser)

Return the HTML source of the currently visited page in browser.

Return the HTML source of the currently visited page in `browser`.
sourceraw docstring

page-textclj

(page-text browser)

Return the complete visible textual content of the current page in the focused window of browser. Text from hidden elements is not included.

Return the complete visible textual content of the current page in the focused window of `browser`. Text from hidden elements is not included.
sourceraw docstring

page-waitclj

(page-wait browser)

Blocks until the browser's current page quiesces. N.B. This is the default for many operations, so this function is likely only useful when things are misbehaving.

Blocks until the browser's current page quiesces. N.B. This is the default for many operations, so this function is likely only useful when things are misbehaving.
sourceraw docstring

status-codeclj

(status-code browser)

Return the current HTTP status code of browser.

Return the current HTTP status code of `browser`.
sourceraw docstring

switch-to-alertclj

(switch-to-alert browser)

Switch browser's focus to the current alert popup. Returns the alert's handle.

Switch `browser`'s focus to the current alert popup. Returns the alert's handle.
sourceraw docstring

switch-to-windowclj

(switch-to-window browser window)

Switch browser to window, which should be a handle returned by all-windows or current-window.

Switch `browser` to `window`, which should be a handle returned by all-windows or current-window.
sourceraw docstring

titleclj

(title browser)

Return the title of the current page in the focused window of browser.

Return the title of the current page in the focused window of `browser`.
sourceraw docstring

with-browsercljmacro

(with-browser binding & body)

Evaluate body in a try block within which binding is bound, finally calling close-browser on binding. This is just a version of with-open that traps the exception that closing a jBrowserDriver instance currently throws.

Evaluate `body` in a try block within which `binding` is bound, finally calling close-browser on binding. This is just a version of with-open that traps the exception that closing a jBrowserDriver instance currently throws.
sourceraw docstring

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

× close