The cl-webdriver-client Reference Manual

This is the cl-webdriver-client Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:32:27 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-webdriver-client

cl-webdriver-client is a binding library to the Selenium 4.0

Authors

TatriX <>
Mariano Montone <>

License

MIT

Dependencies
  • dexador (system).
  • quri (system).
  • cl-json (system).
  • alexandria (system).
  • split-sequence (system).
  • assoc-utils (system).
Source

cl-webdriver-client.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-webdriver-client/src

Source

cl-webdriver-client.asd.

Parent Component

cl-webdriver-client (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-webdriver-client/cl-webdriver-client.asd

Source

cl-webdriver-client.asd.

Parent Component

cl-webdriver-client (system).

ASDF Systems

cl-webdriver-client.


4.1.2 cl-webdriver-client/src/package.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Packages

4.1.3 cl-webdriver-client/src/errors.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 cl-webdriver-client/src/capabilities.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.5 cl-webdriver-client/src/session.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 cl-webdriver-client/src/contexts.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

4.1.7 cl-webdriver-client/src/cookie.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

4.1.8 cl-webdriver-client/src/keys.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface
Internals

*keymap* (special variable).


4.1.9 cl-webdriver-client/src/mouse.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

4.1.10 cl-webdriver-client/src/window.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

window-resize (function).

Internals

4.1.11 cl-webdriver-client/src/user-prompts.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

4.1.12 cl-webdriver-client/src/actions.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

perform-actions (function).

Internals

4.1.13 cl-webdriver-client/src/http.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Internals

4.1.14 cl-webdriver-client/src/webdriver.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.15 cl-webdriver-client/src/utils.lisp

Source

cl-webdriver-client.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 webdriver-client

This package exports functions for working with Selenium WebDriver.

For documentation see:
- https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol - https://www.w3.org/TR/webdriver1

Source

package.lisp.

Nickname

webdriver

Use List
  • assoc-utils.
  • common-lisp.
Used By List
Public Interface
Internals

5.2 webdriver-client-user

User package for interacting with WebDriver (interactive session).

Source

package.lisp.

Nickname

webdriver-user

Use List

5.3 webdriver-client-utils

Package with the purpose of reducing boilerplate.

The exported definitions work with an implicit element. The default implicit element is the current active element. So, it is not neccesary to pass the element you are working with around most of the time.

Source

package.lisp.

Use List
Public Interface

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *default-capabilities*

The default capabilities.

Category: Capabilities

Package

webdriver-client.

Source

capabilities.lisp.

Special Variable: *default-element-func*

Function used to get the ’default element’ by selenium-utils functions. It is ACTIVE-ELEMENT function by default.

Package

webdriver-client-utils.

Source

utils.lisp.

Special Variable: *timeout*

Default timeout value to use in selenium-utils functions.

Package

webdriver-client-utils.

Source

utils.lisp.


6.1.2 Macros

Macro: with-session (capabilities &body body)

Starts a new session, and evaluates BODY in the context of that session. The session is deleted when finished.

Category: Session
See: MAKE-SESSION

Package

webdriver-client.

Source

session.lisp.


6.1.3 Ordinary functions

Function: accept-alert (&key session)

Accept Alert.

Category: User prompts
See: https://www.w3.org/TR/webdriver1/#dfn-accept-alert

Package

webdriver-client.

Source

user-prompts.lisp.

Function: active-element (&key session)

Return the active element of the current browsing context’s document.
The active element is the Element within the DOM that currently has focus. If there’s no active element, an error is signaled.

Category: Elements
See: https://www.w3.org/TR/webdriver2/#get-active-element.
See: https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement.

Package

webdriver-client.

Source

webdriver.lisp.

Function: alert-text (&key session)

Get Alert Text.

Category: User prompts
See: https://www.w3.org/TR/webdriver1/#get-alert-text

Package

webdriver-client.

Source

user-prompts.lisp.

Function: (setf alert-text) (&key session)

The Send Alert Text command sets the text field of a window.prompt user prompt to the given value.

Category: User prompts
See: https://www.w3.org/TR/webdriver1/#send-alert-text

Package

webdriver-client.

Source

user-prompts.lisp.

Function: attr (name &optional selector)

Get acttive element attribute.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: back (&key session)

This command causes the browser to traverse one step backward in the joint session history of the current top-level browsing context. This is equivalent to pressing the back button in the browser chrome or invoking window.history.back.

Category: Navigation
See: https://www.w3.org/TR/webdriver1/#dfn-back .

Package

webdriver-client.

Source

webdriver.lisp.

Function: chrome-capabilities (&rest options)

Specifies Chrome specific capabilities.

Category: Capabilities https://chromedriver.chromium.org/capabilities#h.p_ID_102

Package

webdriver-client.

Source

capabilities.lisp.

Function: classlist (&optional selector)

Get active element class list.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: classname (&optional selector)

Get active element classname.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: click (&optional selector)

Click on active element.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: close-window (&key session)

Close the current window.

See: https://www.w3.org/TR/webdriver1/#close-window Category: Contexts

Package

webdriver-client.

Source

contexts.lisp.

Retrieve all cookies visible to the current page.

Category: Cookies
See: https://www.w3.org/TR/webdriver1/#get-all-cookies .
See: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidcookie .

Package

webdriver-client.

Source

cookie.lisp.

Create a cookie in the cookie store associated with the active document’s address using cookie name name, cookie value value, and an attribute-value list of the following cookie concepts listed in the table for cookie conversion from data:

If there is an error during this step, return error with error code unable to set cookie.

See: https://www.w3.org/TR/webdriver1/#dfn-adding-a-cookie .

Package

webdriver-client.

Source

cookie.lisp.

Function: delete-all-cookies (&key session)

Deletes all cookies

Category: Cookies
See: https://www.w3.org/TR/webdriver1/#delete-all-cookies

Package

webdriver-client.

Source

cookie.lisp.

Function: delete-cookie (cookie-name &key session)

Delete the cookie with name COOKIE-NAME.

Category: Cookies
See: https://www.w3.org/TR/webdriver1/#delete-cookie

Package

webdriver-client.

Source

cookie.lisp.

Function: delete-session (session)

Delete the WebDriver SESSION.

Category: Session

Package

webdriver-client.

Source

session.lisp.

Function: dismiss-alert (&key session)

The Dismiss Alert command dismisses a simple dialog if present. A request to dismiss an alert user prompt, which may not necessarily have a dismiss button, has the same effect as accepting it.

Category: User prompts
See: https://www.w3.org/TR/webdriver1/#dismiss-alert

Package

webdriver-client.

Source

user-prompts.lisp.

Function: elem (&optional selector)

If SELECTOR is given, wait for an element that matches the selector to appear. Otherwise, call *DEFAULT-ELEMENT-FUNC* (the active element is returned by default).

Package

webdriver-client-utils.

Source

utils.lisp.

Function: element-attribute (element name &key session)

Return the ELEMENT’s attribute named NAME.

Category: Elements

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-clear (element &key session)

Clear the contents of ELEMENT (for example, a form field element).

Category: Element interaction
See: https://www.w3.org/TR/webdriver1/#dfn-element-clear.

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-click (element &key session)

The Element Click command scrolls into view the element if it is not already pointer-interactable, and clicks its in-view center point.

If the element’s center point is obscured by another element, an element click intercepted error is returned. If the element is outside the viewport, an element not interactable error is returned.

Category: Element interaction
See: https://www.w3.org/TR/webdriver1/#element-click .

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-displayed (element &key session)

Returns T if ELEMENT is visible.

Category: Elements
See: https://www.w3.org/TR/webdriver1/#element-displayedness .

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-enabled (element &key session)

Returns T if ELEMENT is enabled.

Category: Elements
See: https://www.w3.org/TR/webdriver1/#is-element-enabled .

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-rect (element &key session)

The Get Element Rect command returns the dimensions and coordinates of the given web element. The returned value is a dictionary with the following members:

x
X axis position of the top-left corner of the web element relative to the current browsing context’s document element in CSS pixels.
y
Y axis position of the top-left corner of the web element relative to the current browsing context’s document element in CSS pixels.
height
Height of the web element’s bounding rectangle in CSS pixels.
width
Width of the web element’s bounding rectangle in CSS pixels.

Category: Elements

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-screenshot (element &key session)

The Take Element Screenshot command takes a screenshot of the visible region encompassed by the bounding rectangle of an element. If given a parameter argument scroll that evaluates to false, the element will not be scrolled into view.

Category: Screen capture
See: https://www.w3.org/TR/webdriver1/#take-element-screenshot .

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-send-keys (element keys &key session)

The Element Send Keys command scrolls into view the form control element and then sends the provided keys to the element. In case the element is not keyboard-interactable, an element not interactable error is returned.

KEYS should be a string or a list of characters or control character keywords.

For example:

(element-send-keys el (list :control #t))

See KEY and KEYS functions.

Category: Element interaction
See: https://www.w3.org/TR/webdriver1/#element-send-keys .

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-tagname (element &key session)

Return the ELEMENT’s tag name.

Category: Elements

Package

webdriver-client.

Source

webdriver.lisp.

Function: element-text (element &key session)

The Get Element Text command intends to return an element’s text “as rendered”. An element’s rendered text is also used for locating a elements by their link text and partial link text.

Category: Elements
See: https://www.w3.org/TR/webdriver1/#get-element-text .

Package

webdriver-client.

Source

webdriver.lisp.

Function: execute-script (script args &key session)

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. The executed script is assumed to be synchronous and the result of evaluating the script is returned to the client.

The script argument defines the script to execute in the form of a function body. The value returned by that function will be returned to the client. The function will be invoked with the provided args array and the values may be accessed via the arguments object in the order specified.

Arguments may be any JSON-primitive, array, or JSON object. JSON objects that define a WebElement reference will be converted to the corresponding DOM element. Likewise, any WebElements in the script result will be returned to the client as WebElement JSON objects.

Category: Document handling
See: https://www.w3.org/TR/webdriver1/#executing-script .

Package

webdriver-client.

Source

webdriver.lisp.

Function: find-cookie (cookie-name &key session)

Retrieve the cookie with name COOKIE-NAME.

Category: Cookies
See: https://www.w3.org/TR/webdriver1/#get-named-cookie

Package

webdriver-client.

Source

cookie.lisp.

Function: find-elem (selector &key by)

Find element by SELECTOR. Returns NIL if the element is not found.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: find-element (value &key by session)

The Find Element command is used to find an element in the current browsing context that can be used as the web element context for future element-centric commands.

For example, consider this pseudo code which retrieves an element with the #toremove ID and uses this as the argument for a script it injects to remove it from the HTML document:

let body = session.find.css("#toremove");
session.execute("arguments[0].remove()", [body]);

The BY parameter represents the element location strategy.

It can be one of:
- :id : Finds element by id.
- :class-name : Finds element by class name.
- :css-selector : Returns element that matches css selector.
- :link-text : Returns element that matches <a> element text.
- :partial-link-text: Returns element that matches <a> element text partially.
- :tag-name: Returns element that matches tag name.
- :xpath: Returns element that matches the XPath expression.

If result is empty, a HANDLE-FIND-ERROR is signaled.

Category: Elements
See: https://www.w3.org/TR/webdriver1/#dfn-find-element .

Package

webdriver-client.

Source

webdriver.lisp.

Function: find-element-from-element (element-id value &key by session)

Find an element that matches VALUE using location strategy in BY with a start node of ELEMENT-ID.

Category: Elements
See FIND-ELEMENT.
See https://www.w3.org/TR/webdriver1/#find-element-from-element .

Package

webdriver-client.

Source

webdriver.lisp.

Function: find-elements (value &key by session)

Find elements that match VALUE using location strategy in BY.

Category: Elements
See FIND-ELEMENT.
See https://www.w3.org/TR/webdriver1/#find-elements .

Package

webdriver-client.

Source

webdriver.lisp.

Function: find-elements-from-element (element-id value &key by session)

Find elements that match VALUE using location strategy in BY with a start node of ELEMENT-ID.

Category: Elements
See FIND-ELEMENTS.
See https://www.w3.org/TR/webdriver1/#find-elements-from-element .

Package

webdriver-client.

Source

webdriver.lisp.

Function: firefox-capabilities (&rest options)

Specify capabilities for Firefox browser.

Example usage:

(firefox-capabilities :args #("–headless"))

Category: Capabilities
See: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions

Package

webdriver-client.

Source

capabilities.lisp.

Function: get-cookie (cookie name)

Get value of COOKIE at NAME.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: get-window-handle (&key session)

Returns the window handle associated with the current top-level browsing context. See: https://www.w3.org/TR/webdriver1/#get-window-handle
Category: Contexts

Package

webdriver-client.

Source

contexts.lisp.

Function: get-window-handles (&key session)

Returns the window handles associated with ech top-level browsing context. See: https://www.w3.org/TR/webdriver1/#get-window-handles
Category: Contexts

Package

webdriver-client.

Source

contexts.lisp.

Function: id (&optional selector)

Get active element id.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: key (key)

Returns a string with KEY’s codepoint.

Category: Actions
See: https://www.w3.org/TR/webdriver/#keyboard-actions

Package

webdriver-client.

Source

keys.lisp.

Function: keys (&rest keys)

Returns a string with characters and control keyword charcters in KEYS list.

Example:

(keys :control #t)

Category: Actions
See: https://www.w3.org/TR/webdriver/#keyboard-actions

Package

webdriver-client.

Source

keys.lisp.

Function: log-types (&key session)

Return the types of logs supported by the WebDriver.

- browser: Javascript console logs from the browser.
- client: Logs from the client side implementation of the WebDriver protocol (e.g. the Java bindings).
- driver: Logs from the internals of the driver (e.g. FirefoxDriver internals).
- performance: Logs relating to the performance characteristics of the page under test (e.g. resource load timings). - server: Logs from within the selenium server.

See: https://github.com/SeleniumHQ/selenium/wiki/Logging .

Package

webdriver-client.

Source

webdriver.lisp.

Function: logs (type &key session)

Return the logs of a particular TYPE. See: LOG-TYPES.

Package

webdriver-client.

Source

webdriver.lisp.

Function: make-capabilities (&key always-match first-match)
Package

webdriver-client.

Source

capabilities.lisp.

Function: make-cookie (name value &key path domain secure expiry)

Create a cookie object.

Category: Cookies

Package

webdriver-client.

Source

cookie.lisp.

Function: make-session (&optional capabilities)

Creates a new WebDriver session with the endpoint node. If the creation fails, a session not created error is returned.

CAPABILITIES are the capabilities to negotate for the new session. If it is NIL, then *DEFAULT-CAPABILITIES* are used. If it is a list, then it is use as parameters for MAKE-CAPABILITIES to build a new CAPABILITIES object. Otherwise, it is assumed to be a CAPABILITIES object.

Category: Session
See: https://www.w3.org/TR/webdriver1/#new-session .
See: https://www.w3.org/TR/webdriver1/#capabilities .

Package

webdriver-client.

Source

session.lisp.

Function: merge-capabilities (cap1 cap2)

Merge two capabilities

Category: Capabilities

Package

webdriver-client.

Source

capabilities.lisp.

Function: mouse-click (button &key session)

Click any mouse button (at the coordinates set by the last moveto command). Note that calling this command after calling buttondown and before calling button up (or any out-of-order interactions sequence) will yield undefined behaviour).

See: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidclick

Package

webdriver-client.

Source

mouse.lisp.

Function: mouse-move-to (x y &key element session)

Move the mouse by an offset of the specificed element. If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.

See: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidmoveto

Package

webdriver-client.

Source

mouse.lisp.

Function: new-window (&key session)

Create a new top-level browsing context.

Category: Contexts
See: https://w3c.github.io/webdriver/#new-window

Package

webdriver-client.

Source

contexts.lisp.

Function: page-source (&key session)

Returns a string serialization of the DOM of the current browsing context active document.

Category: Navigation
See: https://www.w3.org/TR/webdriver1/#get-page-source

Package

webdriver-client.

Source

webdriver.lisp.

Function: page-title (&key session)

This command returns the document title of the current top-level browsing context, equivalent to calling document.title.

Category: Navigation
See: https://www.w3.org/TR/webdriver2/#get-title .

Package

webdriver-client.

Source

webdriver.lisp.

Function: perform-actions (actions &optional session)

The Actions API provides a low-level interface for providing virtualised device input to the web browser.
Conceptually, the Actions commands divide time into a series of ticks. The local end sends a series of actions which correspond to the change in state, if any, of each input device during each tick. For example, pressing a key is represented by an action sequence consisting of a single key input device and two ticks, the first containing a keyDown action, and the second a keyUp action, whereas a pinch-zoom input is represented by an action sequence consisting of three ticks and two pointer input devices of type touch, each performing a sequence of actions pointerDown, followed by pointerMove, and then pointerUp.

Category: Actions
See: https://www.w3.org/TR/webdriver/#actions

Package

webdriver-client.

Source

actions.lisp.

Function: refresh (&key session)

Refresh the current page.

Category: Navigation

Package

webdriver-client.

Source

webdriver.lisp.

Function: screenshot (&key session)

Screenshots are a mechanism for providing additional visual diagnostic information. They work by dumping a snapshot of the initial viewport’s framebuffer as a lossless PNG image. It is returned to the local end as a Base64 encoded string.

Category: Screen capture
See: https://www.w3.org/TR/webdriver2/#screen-capture .

Package

webdriver-client.

Source

webdriver.lisp.

Function: send-key (key &optional selector)

Send a key to active element.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: send-keys (keys &optional selector)

Send keys to active element.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: start-interactive-session (&optional capabilities)

Start an interactive session. Use this to interact with Selenium driver from a REPL.

Category: Session
See: MAKE-SESSION

Package

webdriver-client.

Source

session.lisp.

Function: stop-interactive-session (&optional ignore-errors)

Stop an interactive session.

Sometimes *SESSION* could be out of sync with Webdriver instance. In that case we may want to ignore errors when trying to delete the session. IGNORE-ERRORS argument controls that.

Category: Session

Package

webdriver-client.

Source

session.lisp.

Function: switch-to-frame (id &key session)

Change focus to another frame on the page. If the frame id is null, the server
should switch to the page’s default content.

In the context of a web browser, a frame is a part of a web page or browser window which displays content independent of its container, with the ability to load content independently.

Category: Contexts
See: https://www.w3.org/TR/webdriver1/#switch-to-frame

Package

webdriver-client.

Source

contexts.lisp.

Function: switch-to-window (window-handle &key session)

Switching window will select the current top-level browsing context used as the target for all subsequent commands. In a tabbed browser, this will typically make the tab containing the browsing context the selected tab.

WINDOW-HANDLE is the handle of the window obtained via GET-WINDOW-HANDLE.

See: https://www.w3.org/TR/webdriver1/#switch-to-window
Category: Contexts

Package

webdriver-client.

Source

contexts.lisp.

Function: text (&optional selector)

Get active element’s text.

Package

webdriver-client-utils.

Source

utils.lisp.

Function: url (&key session)

Get the current url in session.

Category: Navigation
See: https://www.w3.org/TR/webdriver1/#dfn-get-current-url .

Package

webdriver-client.

Source

webdriver.lisp.

Function: (setf url) (&key session)

The command causes the user agent to navigate the current top-level browsing context to a new location.

Category: Navigation
See: https://www.w3.org/TR/webdriver1/#dfn-navigate-to .

Package

webdriver-client.

Source

webdriver.lisp.

Function: use-session (session)

Make SESSION the current session.

Category: Session

Package

webdriver-client.

Source

session.lisp.

Function: wait-for (selector &key timeout)

Wait for an element that matches SELECTOR to appear on the screen. TIMEOUT indicates how much time to wait (default is *TIMEOUT*).

Package

webdriver-client-utils.

Source

utils.lisp.

Function: webdriver-status ()

Get WebDriver status information

Package

webdriver-client.

Source

webdriver.lisp.

Function: window-resize (&key width height session)
Package

webdriver-client.

Source

window.lisp.


6.1.4 Generic functions

Generic Reader: element-id (object)
Package

webdriver-client.

Methods
Reader Method: element-id ((element element))

automatically generated reader method

Source

webdriver.lisp.

Target Slot

id.


6.1.5 Standalone methods

Method: encode-json ((cookie cookie) &optional stream)
Package

json.

Source

cookie.lisp.

Method: print-object ((session session) stream)
Source

session.lisp.

Method: print-object ((element element) stream)
Source

webdriver.lisp.

Method: print-object ((error protocol-error) stream)
Source

errors.lisp.


6.1.6 Conditions

Condition: no-such-element-error

Error signaled when no such element is found.

Package

webdriver-client.

Source

errors.lisp.

Direct superclasses

find-error.


6.1.7 Classes

A cookie is described in [RFC6265] by a name-value pair holding the cookie’s data, followed by zero or more attribute-value pairs describing its characteristics.

Category: Cookies

Package

webdriver-client.

Source

cookie.lisp.

Direct methods

encode-json.

Direct slots
Slot: name

The name of the cookie

Initargs

:name

Slot: value

The cookie value

Initargs

:value

Slot: path

The cookie path. Defaults to ’/’ if omitted when adding a cookie.

Initargs

:path

Slot: domain

The domain the cookie is visible to. Defaults to the current browsing context’s active document’s URL domain if omitted when adding a cookie.

Initargs

:domain

Slot: secure

Whether the cookie is a secure cookie. Defaults to false if omitted when adding a cookie.

Initargs

:secure

Slot: http-only

Whether the cookie is an HTTP only cookie. Defaults to false if omitted when adding a cookie.

Initargs

:http-only

Slot: expiry

When the cookie expires, specified in seconds since Unix Epoch. Must not be set if omitted when adding a cookie.

Initargs

:expiry


6.2 Internals


6.2.1 Special variables

Special Variable: *keymap*

See https://www.w3.org/TR/webdriver1/#keyboard-actions

Package

webdriver-client.

Source

keys.lisp.

Special Variable: *prefix*
Package

webdriver-client.

Source

http.lisp.

Special Variable: *session*

The current Selenium WebDriver session.

Package

webdriver-client.

Source

session.lisp.

Special Variable: *uri*
Package

webdriver-client.

Source

http.lisp.


6.2.2 Macros

Macro: with-decode-and-handler (body)
Package

webdriver-client.

Source

http.lisp.


6.2.3 Ordinary functions

Function: by (type)

An element location strategy is an enumerated attribute deciding what technique should be used to search for elements in the current browsing context. See: https://www.w3.org/TR/webdriver1/#dfn-strategy .

Package

webdriver-client.

Source

webdriver.lisp.

Reader: capabilities-always-match (instance)
Writer: (setf capabilities-always-match) (instance)
Package

webdriver-client.

Source

capabilities.lisp.

Target Slot

always-match.

Reader: capabilities-first-match (instance)
Writer: (setf capabilities-first-match) (instance)
Package

webdriver-client.

Source

capabilities.lisp.

Target Slot

first-match.

Function: capabilities-p (object)
Package

webdriver-client.

Source

capabilities.lisp.

Function: check (response)

Validates the status of Selenium Webdriver response.

Package

webdriver-client.

Source

http.lisp.

Function: copy-capabilities (instance)
Package

webdriver-client.

Source

capabilities.lisp.

Function: decode (json)
Package

webdriver-client.

Source

http.lisp.

Function: detect-platform-name ()
Package

webdriver-client.

Source

capabilities.lisp.

Function: encode (plist)
Package

webdriver-client.

Source

http.lisp.

Function: expand-action-item (action-item)
Package

webdriver-client.

Source

actions.lisp.

Function: expand-actions (actions)
Package

webdriver-client.

Source

actions.lisp.

Function: get-window-rect (&key session)
Package

webdriver-client.

Source

window.lisp.

Function: handle-find-error (err &key value by)

Signal the correct type of error depending on PROTOCOL-ERROR-STATUS.

See: https://www.w3.org/TR/webdriver1/#handling-errors

Package

webdriver-client.

Source

webdriver.lisp.

Function: http-delete (path)
Package

webdriver-client.

Source

http.lisp.

Function: http-delete-check (path)
Package

webdriver-client.

Source

http.lisp.

Function: http-get (path)
Package

webdriver-client.

Source

http.lisp.

Function: http-get-check (path)
Package

webdriver-client.

Source

http.lisp.

Function: http-get-value (path)
Package

webdriver-client.

Source

http.lisp.

Function: http-post (path &rest params)
Package

webdriver-client.

Source

http.lisp.

Function: http-post-check (path &rest params)
Package

webdriver-client.

Source

http.lisp.

Function: http-post-value (path &rest params)
Package

webdriver-client.

Source

http.lisp.

Function: keyword-plist-p (list)

Check if LIST is a property list with keyword keys.

Package

webdriver-client.

Source

session.lisp.

Function: make-uri (path)
Package

webdriver-client.

Source

http.lisp.

Function: plist-p (list)

Check if LIST is a property list.

Package

webdriver-client.

Source

session.lisp.

Function: protocol-error-error (error)
Package

webdriver-client.

Source

errors.lisp.

Function: serialize-capabilities (capabilities)
Package

webdriver-client.

Source

capabilities.lisp.

Function: session-path (session fmt &rest args)
Package

webdriver-client.

Source

session.lisp.

Function: set-window-rect (&key x y width height session)
Package

webdriver-client.

Source

window.lisp.

Function: value (response)
Package

webdriver-client.

Source

http.lisp.


6.2.4 Generic functions

Generic Reader: protocol-error-body (condition)
Package

webdriver-client.

Methods
Reader Method: protocol-error-body ((condition protocol-error))
Source

errors.lisp.

Target Slot

body.

Generic Reader: protocol-error-status (condition)
Package

webdriver-client.

Methods
Reader Method: protocol-error-status ((condition protocol-error))
Source

errors.lisp.

Target Slot

status.

Generic Reader: session-id (object)
Package

webdriver-client.

Methods
Reader Method: session-id ((session session))

automatically generated reader method

Source

session.lisp.

Target Slot

id.


6.2.5 Conditions

Condition: find-error
Package

webdriver-client.

Source

errors.lisp.

Direct superclasses

error.

Direct subclasses
Direct slots
Slot: value
Initargs

:value

Slot: by
Initargs

:by

Condition: protocol-error
Package

webdriver-client.

Source

errors.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: body
Initargs

:body

Readers

protocol-error-body.

Writers

This slot is read-only.

Slot: status
Initargs

:status

Readers

protocol-error-status.

Writers

This slot is read-only.

Condition: stale-element-reference
Package

webdriver-client.

Source

errors.lisp.

Direct superclasses

find-error.


6.2.6 Structures

Structure: capabilities
Package

webdriver-client.

Source

capabilities.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: always-match
Readers

capabilities-always-match.

Writers

(setf capabilities-always-match).

Slot: first-match
Readers

capabilities-first-match.

Writers

(setf capabilities-first-match).


6.2.7 Classes

Class: element
Package

webdriver-client.

Source

webdriver.lisp.

Direct methods
Direct slots
Slot: id
Initform

(error "must supply :id")

Initargs

:id

Readers

element-id.

Writers

This slot is read-only.

Class: session

A Selenium Webdriver session.

The server should maintain one browser per session. Commands sent to a session will be directed to the corresponding browser.

Package

webdriver-client.

Source

session.lisp.

Direct methods
Direct slots
Slot: id
Initform

(error "must supply an id")

Initargs

:id

Readers

session-id.

Writers

This slot is read-only.


6.2.8 Types

Type: element-location-strategy ()

An element location strategy is an enumerated attribute deciding what technique should be used to search for elements in the current browsing context. See: https://www.w3.org/TR/webdriver1/#dfn-strategy .

Package

webdriver-client.

Source

webdriver.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   I   K   L   M   N   P   R   S   T   U   V   W  
Index Entry  Section

(
(setf alert-text): Public ordinary functions
(setf capabilities-always-match): Private ordinary functions
(setf capabilities-first-match): Private ordinary functions
(setf cookie): Public ordinary functions
(setf url): Public ordinary functions

A
accept-alert: Public ordinary functions
active-element: Public ordinary functions
alert-text: Public ordinary functions
attr: Public ordinary functions

B
back: Public ordinary functions
by: Private ordinary functions

C
capabilities-always-match: Private ordinary functions
capabilities-first-match: Private ordinary functions
capabilities-p: Private ordinary functions
check: Private ordinary functions
chrome-capabilities: Public ordinary functions
classlist: Public ordinary functions
classname: Public ordinary functions
click: Public ordinary functions
close-window: Public ordinary functions
cookie: Public ordinary functions
copy-capabilities: Private ordinary functions

D
decode: Private ordinary functions
delete-all-cookies: Public ordinary functions
delete-cookie: Public ordinary functions
delete-session: Public ordinary functions
detect-platform-name: Private ordinary functions
dismiss-alert: Public ordinary functions

E
elem: Public ordinary functions
element-attribute: Public ordinary functions
element-clear: Public ordinary functions
element-click: Public ordinary functions
element-displayed: Public ordinary functions
element-enabled: Public ordinary functions
element-id: Public generic functions
element-id: Public generic functions
element-rect: Public ordinary functions
element-screenshot: Public ordinary functions
element-send-keys: Public ordinary functions
element-tagname: Public ordinary functions
element-text: Public ordinary functions
encode: Private ordinary functions
encode-json: Public standalone methods
execute-script: Public ordinary functions
expand-action-item: Private ordinary functions
expand-actions: Private ordinary functions

F
find-cookie: Public ordinary functions
find-elem: Public ordinary functions
find-element: Public ordinary functions
find-element-from-element: Public ordinary functions
find-elements: Public ordinary functions
find-elements-from-element: Public ordinary functions
firefox-capabilities: Public ordinary functions
Function, (setf alert-text): Public ordinary functions
Function, (setf capabilities-always-match): Private ordinary functions
Function, (setf capabilities-first-match): Private ordinary functions
Function, (setf cookie): Public ordinary functions
Function, (setf url): Public ordinary functions
Function, accept-alert: Public ordinary functions
Function, active-element: Public ordinary functions
Function, alert-text: Public ordinary functions
Function, attr: Public ordinary functions
Function, back: Public ordinary functions
Function, by: Private ordinary functions
Function, capabilities-always-match: Private ordinary functions
Function, capabilities-first-match: Private ordinary functions
Function, capabilities-p: Private ordinary functions
Function, check: Private ordinary functions
Function, chrome-capabilities: Public ordinary functions
Function, classlist: Public ordinary functions
Function, classname: Public ordinary functions
Function, click: Public ordinary functions
Function, close-window: Public ordinary functions
Function, cookie: Public ordinary functions
Function, copy-capabilities: Private ordinary functions
Function, decode: Private ordinary functions
Function, delete-all-cookies: Public ordinary functions
Function, delete-cookie: Public ordinary functions
Function, delete-session: Public ordinary functions
Function, detect-platform-name: Private ordinary functions
Function, dismiss-alert: Public ordinary functions
Function, elem: Public ordinary functions
Function, element-attribute: Public ordinary functions
Function, element-clear: Public ordinary functions
Function, element-click: Public ordinary functions
Function, element-displayed: Public ordinary functions
Function, element-enabled: Public ordinary functions
Function, element-rect: Public ordinary functions
Function, element-screenshot: Public ordinary functions
Function, element-send-keys: Public ordinary functions
Function, element-tagname: Public ordinary functions
Function, element-text: Public ordinary functions
Function, encode: Private ordinary functions
Function, execute-script: Public ordinary functions
Function, expand-action-item: Private ordinary functions
Function, expand-actions: Private ordinary functions
Function, find-cookie: Public ordinary functions
Function, find-elem: Public ordinary functions
Function, find-element: Public ordinary functions
Function, find-element-from-element: Public ordinary functions
Function, find-elements: Public ordinary functions
Function, find-elements-from-element: Public ordinary functions
Function, firefox-capabilities: Public ordinary functions
Function, get-cookie: Public ordinary functions
Function, get-window-handle: Public ordinary functions
Function, get-window-handles: Public ordinary functions
Function, get-window-rect: Private ordinary functions
Function, handle-find-error: Private ordinary functions
Function, http-delete: Private ordinary functions
Function, http-delete-check: Private ordinary functions
Function, http-get: Private ordinary functions
Function, http-get-check: Private ordinary functions
Function, http-get-value: Private ordinary functions
Function, http-post: Private ordinary functions
Function, http-post-check: Private ordinary functions
Function, http-post-value: Private ordinary functions
Function, id: Public ordinary functions
Function, key: Public ordinary functions
Function, keys: Public ordinary functions
Function, keyword-plist-p: Private ordinary functions
Function, log-types: Public ordinary functions
Function, logs: Public ordinary functions
Function, make-capabilities: Public ordinary functions
Function, make-cookie: Public ordinary functions
Function, make-session: Public ordinary functions
Function, make-uri: Private ordinary functions
Function, merge-capabilities: Public ordinary functions
Function, mouse-click: Public ordinary functions
Function, mouse-move-to: Public ordinary functions
Function, new-window: Public ordinary functions
Function, page-source: Public ordinary functions
Function, page-title: Public ordinary functions
Function, perform-actions: Public ordinary functions
Function, plist-p: Private ordinary functions
Function, protocol-error-error: Private ordinary functions
Function, refresh: Public ordinary functions
Function, screenshot: Public ordinary functions
Function, send-key: Public ordinary functions
Function, send-keys: Public ordinary functions
Function, serialize-capabilities: Private ordinary functions
Function, session-path: Private ordinary functions
Function, set-window-rect: Private ordinary functions
Function, start-interactive-session: Public ordinary functions
Function, stop-interactive-session: Public ordinary functions
Function, switch-to-frame: Public ordinary functions
Function, switch-to-window: Public ordinary functions
Function, text: Public ordinary functions
Function, url: Public ordinary functions
Function, use-session: Public ordinary functions
Function, value: Private ordinary functions
Function, wait-for: Public ordinary functions
Function, webdriver-status: Public ordinary functions
Function, window-resize: Public ordinary functions

G
Generic Function, element-id: Public generic functions
Generic Function, protocol-error-body: Private generic functions
Generic Function, protocol-error-status: Private generic functions
Generic Function, session-id: Private generic functions
get-cookie: Public ordinary functions
get-window-handle: Public ordinary functions
get-window-handles: Public ordinary functions
get-window-rect: Private ordinary functions

H
handle-find-error: Private ordinary functions
http-delete: Private ordinary functions
http-delete-check: Private ordinary functions
http-get: Private ordinary functions
http-get-check: Private ordinary functions
http-get-value: Private ordinary functions
http-post: Private ordinary functions
http-post-check: Private ordinary functions
http-post-value: Private ordinary functions

I
id: Public ordinary functions

K
key: Public ordinary functions
keys: Public ordinary functions
keyword-plist-p: Private ordinary functions

L
log-types: Public ordinary functions
logs: Public ordinary functions

M
Macro, with-decode-and-handler: Private macros
Macro, with-session: Public macros
make-capabilities: Public ordinary functions
make-cookie: Public ordinary functions
make-session: Public ordinary functions
make-uri: Private ordinary functions
merge-capabilities: Public ordinary functions
Method, element-id: Public generic functions
Method, encode-json: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, protocol-error-body: Private generic functions
Method, protocol-error-status: Private generic functions
Method, session-id: Private generic functions
mouse-click: Public ordinary functions
mouse-move-to: Public ordinary functions

N
new-window: Public ordinary functions

P
page-source: Public ordinary functions
page-title: Public ordinary functions
perform-actions: Public ordinary functions
plist-p: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
protocol-error-body: Private generic functions
protocol-error-body: Private generic functions
protocol-error-error: Private ordinary functions
protocol-error-status: Private generic functions
protocol-error-status: Private generic functions

R
refresh: Public ordinary functions

S
screenshot: Public ordinary functions
send-key: Public ordinary functions
send-keys: Public ordinary functions
serialize-capabilities: Private ordinary functions
session-id: Private generic functions
session-id: Private generic functions
session-path: Private ordinary functions
set-window-rect: Private ordinary functions
start-interactive-session: Public ordinary functions
stop-interactive-session: Public ordinary functions
switch-to-frame: Public ordinary functions
switch-to-window: Public ordinary functions

T
text: Public ordinary functions

U
url: Public ordinary functions
use-session: Public ordinary functions

V
value: Private ordinary functions

W
wait-for: Public ordinary functions
webdriver-status: Public ordinary functions
window-resize: Public ordinary functions
with-decode-and-handler: Private macros
with-session: Public macros


A.3 Variables

Jump to:   *  
A   B   D   E   F   H   I   N   P   S   V  
Index Entry  Section

*
*default-capabilities*: Public special variables
*default-element-func*: Public special variables
*keymap*: Private special variables
*prefix*: Private special variables
*session*: Private special variables
*timeout*: Public special variables
*uri*: Private special variables

A
always-match: Private structures

B
body: Private conditions
by: Private conditions

D
domain: Public classes

E
expiry: Public classes

F
first-match: Private structures

H
http-only: Public classes

I
id: Private classes
id: Private classes

N
name: Public classes

P
path: Public classes

S
secure: Public classes
Slot, always-match: Private structures
Slot, body: Private conditions
Slot, by: Private conditions
Slot, domain: Public classes
Slot, expiry: Public classes
Slot, first-match: Private structures
Slot, http-only: Public classes
Slot, id: Private classes
Slot, id: Private classes
Slot, name: Public classes
Slot, path: Public classes
Slot, secure: Public classes
Slot, status: Private conditions
Slot, value: Public classes
Slot, value: Private conditions
Special Variable, *default-capabilities*: Public special variables
Special Variable, *default-element-func*: Public special variables
Special Variable, *keymap*: Private special variables
Special Variable, *prefix*: Private special variables
Special Variable, *session*: Private special variables
Special Variable, *timeout*: Public special variables
Special Variable, *uri*: Private special variables
status: Private conditions

V
value: Public classes
value: Private conditions


A.4 Data types

Jump to:   A   C   E   F   H   K   M   N   P   S   T   U   W  
Index Entry  Section

A
actions.lisp: The cl-webdriver-client/src/actions․lisp file

C
capabilities: Private structures
capabilities.lisp: The cl-webdriver-client/src/capabilities․lisp file
cl-webdriver-client: The cl-webdriver-client system
cl-webdriver-client.asd: The cl-webdriver-client/cl-webdriver-client․asd file
Class, cookie: Public classes
Class, element: Private classes
Class, session: Private classes
Condition, find-error: Private conditions
Condition, no-such-element-error: Public conditions
Condition, protocol-error: Private conditions
Condition, stale-element-reference: Private conditions
contexts.lisp: The cl-webdriver-client/src/contexts․lisp file
cookie: Public classes
cookie.lisp: The cl-webdriver-client/src/cookie․lisp file

E
element: Private classes
element-location-strategy: Private types
errors.lisp: The cl-webdriver-client/src/errors․lisp file

F
File, actions.lisp: The cl-webdriver-client/src/actions․lisp file
File, capabilities.lisp: The cl-webdriver-client/src/capabilities․lisp file
File, cl-webdriver-client.asd: The cl-webdriver-client/cl-webdriver-client․asd file
File, contexts.lisp: The cl-webdriver-client/src/contexts․lisp file
File, cookie.lisp: The cl-webdriver-client/src/cookie․lisp file
File, errors.lisp: The cl-webdriver-client/src/errors․lisp file
File, http.lisp: The cl-webdriver-client/src/http․lisp file
File, keys.lisp: The cl-webdriver-client/src/keys․lisp file
File, mouse.lisp: The cl-webdriver-client/src/mouse․lisp file
File, package.lisp: The cl-webdriver-client/src/package․lisp file
File, session.lisp: The cl-webdriver-client/src/session․lisp file
File, user-prompts.lisp: The cl-webdriver-client/src/user-prompts․lisp file
File, utils.lisp: The cl-webdriver-client/src/utils․lisp file
File, webdriver.lisp: The cl-webdriver-client/src/webdriver․lisp file
File, window.lisp: The cl-webdriver-client/src/window․lisp file
find-error: Private conditions

H
http.lisp: The cl-webdriver-client/src/http․lisp file

K
keys.lisp: The cl-webdriver-client/src/keys․lisp file

M
Module, src: The cl-webdriver-client/src module
mouse.lisp: The cl-webdriver-client/src/mouse․lisp file

N
no-such-element-error: Public conditions

P
Package, webdriver-client: The webdriver-client package
Package, webdriver-client-user: The webdriver-client-user package
Package, webdriver-client-utils: The webdriver-client-utils package
package.lisp: The cl-webdriver-client/src/package․lisp file
protocol-error: Private conditions

S
session: Private classes
session.lisp: The cl-webdriver-client/src/session․lisp file
src: The cl-webdriver-client/src module
stale-element-reference: Private conditions
Structure, capabilities: Private structures
System, cl-webdriver-client: The cl-webdriver-client system

T
Type, element-location-strategy: Private types

U
user-prompts.lisp: The cl-webdriver-client/src/user-prompts․lisp file
utils.lisp: The cl-webdriver-client/src/utils․lisp file

W
webdriver-client: The webdriver-client package
webdriver-client-user: The webdriver-client-user package
webdriver-client-utils: The webdriver-client-utils package
webdriver.lisp: The cl-webdriver-client/src/webdriver․lisp file
window.lisp: The cl-webdriver-client/src/window․lisp file