This is the cl-webdriver-client Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:31:47 2024 GMT+0.
cl-webdriver-client/cl-webdriver-client.asd
cl-webdriver-client/src/package.lisp
cl-webdriver-client/src/errors.lisp
cl-webdriver-client/src/capabilities.lisp
cl-webdriver-client/src/session.lisp
cl-webdriver-client/src/contexts.lisp
cl-webdriver-client/src/cookie.lisp
cl-webdriver-client/src/keys.lisp
cl-webdriver-client/src/mouse.lisp
cl-webdriver-client/src/window.lisp
cl-webdriver-client/src/user-prompts.lisp
cl-webdriver-client/src/actions.lisp
cl-webdriver-client/src/http.lisp
cl-webdriver-client/src/webdriver.lisp
cl-webdriver-client/src/utils.lisp
The main system appears first, followed by any subsystem dependency.
cl-webdriver-client
cl-webdriver-client is a binding library to the Selenium 4.0
TatriX <tatrics@gmail.com>
Mariano Montone <marianomontone@gmail.com>
MIT
dexador
(system).
quri
(system).
cl-json
(system).
alexandria
(system).
split-sequence
(system).
assoc-utils
(system).
src
(module).
Modules are listed depth-first from the system components tree.
cl-webdriver-client/src
cl-webdriver-client
(system).
package.lisp
(file).
errors.lisp
(file).
capabilities.lisp
(file).
session.lisp
(file).
contexts.lisp
(file).
cookie.lisp
(file).
keys.lisp
(file).
mouse.lisp
(file).
window.lisp
(file).
user-prompts.lisp
(file).
actions.lisp
(file).
http.lisp
(file).
webdriver.lisp
(file).
utils.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-webdriver-client/cl-webdriver-client.asd
cl-webdriver-client/src/package.lisp
cl-webdriver-client/src/errors.lisp
cl-webdriver-client/src/capabilities.lisp
cl-webdriver-client/src/session.lisp
cl-webdriver-client/src/contexts.lisp
cl-webdriver-client/src/cookie.lisp
cl-webdriver-client/src/keys.lisp
cl-webdriver-client/src/mouse.lisp
cl-webdriver-client/src/window.lisp
cl-webdriver-client/src/user-prompts.lisp
cl-webdriver-client/src/actions.lisp
cl-webdriver-client/src/http.lisp
cl-webdriver-client/src/webdriver.lisp
cl-webdriver-client/src/utils.lisp
cl-webdriver-client/cl-webdriver-client.asd
cl-webdriver-client
(system).
cl-webdriver-client/src/errors.lisp
src
(module).
no-such-element-error
(condition).
print-object
(method).
find-error
(condition).
protocol-error
(condition).
protocol-error-body
(reader method).
protocol-error-error
(function).
protocol-error-status
(reader method).
stale-element-reference
(condition).
cl-webdriver-client/src/capabilities.lisp
src
(module).
*default-capabilities*
(special variable).
chrome-capabilities
(function).
firefox-capabilities
(function).
make-capabilities
(function).
merge-capabilities
(function).
capabilities
(structure).
capabilities-always-match
(reader).
(setf capabilities-always-match)
(writer).
capabilities-first-match
(reader).
(setf capabilities-first-match)
(writer).
capabilities-p
(function).
copy-capabilities
(function).
detect-platform-name
(function).
serialize-capabilities
(function).
cl-webdriver-client/src/session.lisp
src
(module).
delete-session
(function).
make-session
(function).
print-object
(method).
start-interactive-session
(function).
stop-interactive-session
(function).
use-session
(function).
with-session
(macro).
*session*
(special variable).
keyword-plist-p
(function).
plist-p
(function).
session
(class).
session-id
(reader method).
session-path
(function).
cl-webdriver-client/src/contexts.lisp
src
(module).
close-window
(function).
get-window-handle
(function).
get-window-handles
(function).
new-window
(function).
switch-to-frame
(function).
switch-to-window
(function).
cl-webdriver-client/src/cookie.lisp
src
(module).
cookie
(function).
(setf cookie)
(function).
cookie
(class).
delete-all-cookies
(function).
delete-cookie
(function).
encode-json
(method).
find-cookie
(function).
make-cookie
(function).
cl-webdriver-client/src/keys.lisp
cl-webdriver-client/src/mouse.lisp
src
(module).
mouse-click
(function).
mouse-move-to
(function).
cl-webdriver-client/src/window.lisp
src
(module).
window-resize
(function).
get-window-rect
(function).
set-window-rect
(function).
cl-webdriver-client/src/user-prompts.lisp
src
(module).
accept-alert
(function).
alert-text
(function).
(setf alert-text)
(function).
dismiss-alert
(function).
cl-webdriver-client/src/actions.lisp
src
(module).
perform-actions
(function).
expand-action-item
(function).
expand-actions
(function).
cl-webdriver-client/src/http.lisp
src
(module).
*prefix*
(special variable).
*uri*
(special variable).
check
(function).
decode
(function).
encode
(function).
http-delete
(function).
http-delete-check
(function).
http-get
(function).
http-get-check
(function).
http-get-value
(function).
http-post
(function).
http-post-check
(function).
http-post-value
(function).
make-uri
(function).
value
(function).
with-decode-and-handler
(macro).
cl-webdriver-client/src/webdriver.lisp
src
(module).
active-element
(function).
back
(function).
element-attribute
(function).
element-clear
(function).
element-click
(function).
element-displayed
(function).
element-enabled
(function).
element-id
(reader method).
element-rect
(function).
element-screenshot
(function).
element-send-keys
(function).
element-tagname
(function).
element-text
(function).
execute-script
(function).
find-element
(function).
find-element-from-element
(function).
find-elements
(function).
find-elements-from-element
(function).
log-types
(function).
logs
(function).
page-source
(function).
page-title
(function).
print-object
(method).
refresh
(function).
screenshot
(function).
url
(function).
(setf url)
(function).
webdriver-status
(function).
by
(function).
element
(class).
element-location-strategy
(type).
handle-find-error
(function).
cl-webdriver-client/src/utils.lisp
src
(module).
*default-element-func*
(special variable).
*timeout*
(special variable).
attr
(function).
classlist
(function).
classname
(function).
click
(function).
elem
(function).
find-elem
(function).
get-cookie
(function).
id
(function).
send-key
(function).
send-keys
(function).
text
(function).
wait-for
(function).
Packages are listed by definition order.
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
webdriver
assoc-utils
.
common-lisp
.
*default-capabilities*
(special variable).
accept-alert
(function).
active-element
(function).
alert-text
(function).
(setf alert-text)
(function).
back
(function).
chrome-capabilities
(function).
close-window
(function).
cookie
(function).
(setf cookie)
(function).
cookie
(class).
delete-all-cookies
(function).
delete-cookie
(function).
delete-session
(function).
dismiss-alert
(function).
element-attribute
(function).
element-clear
(function).
element-click
(function).
element-displayed
(function).
element-enabled
(function).
element-id
(generic reader).
element-rect
(function).
element-screenshot
(function).
element-send-keys
(function).
element-tagname
(function).
element-text
(function).
execute-script
(function).
find-cookie
(function).
find-element
(function).
find-element-from-element
(function).
find-elements
(function).
find-elements-from-element
(function).
firefox-capabilities
(function).
get-window-handle
(function).
get-window-handles
(function).
key
(function).
keys
(function).
log-types
(function).
logs
(function).
make-capabilities
(function).
make-cookie
(function).
make-session
(function).
merge-capabilities
(function).
mouse-click
(function).
mouse-move-to
(function).
new-window
(function).
no-such-element-error
(condition).
page-source
(function).
page-title
(function).
perform-actions
(function).
refresh
(function).
screenshot
(function).
start-interactive-session
(function).
stop-interactive-session
(function).
switch-to-frame
(function).
switch-to-window
(function).
url
(function).
(setf url)
(function).
use-session
(function).
webdriver-status
(function).
window-resize
(function).
with-session
(macro).
*keymap*
(special variable).
*prefix*
(special variable).
*session*
(special variable).
*uri*
(special variable).
by
(function).
capabilities
(structure).
capabilities-always-match
(reader).
(setf capabilities-always-match)
(writer).
capabilities-first-match
(reader).
(setf capabilities-first-match)
(writer).
capabilities-p
(function).
check
(function).
copy-capabilities
(function).
decode
(function).
detect-platform-name
(function).
element
(class).
element-location-strategy
(type).
encode
(function).
expand-action-item
(function).
expand-actions
(function).
find-error
(condition).
get-window-rect
(function).
handle-find-error
(function).
http-delete
(function).
http-delete-check
(function).
http-get
(function).
http-get-check
(function).
http-get-value
(function).
http-post
(function).
http-post-check
(function).
http-post-value
(function).
keyword-plist-p
(function).
make-uri
(function).
plist-p
(function).
protocol-error
(condition).
protocol-error-body
(generic reader).
protocol-error-error
(function).
protocol-error-status
(generic reader).
serialize-capabilities
(function).
session
(class).
session-id
(generic reader).
session-path
(function).
set-window-rect
(function).
stale-element-reference
(condition).
value
(function).
with-decode-and-handler
(macro).
webdriver-client-user
User package for interacting with WebDriver (interactive session).
webdriver-user
common-lisp
.
webdriver-client
.
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.
common-lisp
.
webdriver-client
.
*default-element-func*
(special variable).
*timeout*
(special variable).
attr
(function).
classlist
(function).
classname
(function).
click
(function).
elem
(function).
find-elem
(function).
get-cookie
(function).
id
(function).
send-key
(function).
send-keys
(function).
text
(function).
wait-for
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The default capabilities.
Category: Capabilities
Function used to get the ’default element’ by selenium-utils functions. It is ACTIVE-ELEMENT function by default.
Default timeout value to use in selenium-utils functions.
Starts a new session, and evaluates BODY in the context of that session.
The session is deleted when finished.
Category: Session
See: MAKE-SESSION
Accept Alert.
Category: User prompts
See: https://www.w3.org/TR/webdriver1/#dfn-accept-alert
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.
Get Alert Text.
Category: User prompts
See: https://www.w3.org/TR/webdriver1/#get-alert-text
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
Get acttive element attribute.
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 .
Specifies Chrome specific capabilities.
Category: Capabilities https://chromedriver.chromium.org/capabilities#h.p_ID_102
Get active element class list.
Get active element classname.
Click on active element.
Close the current window.
See: https://www.w3.org/TR/webdriver1/#close-window Category: Contexts
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 .
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 .
Deletes all cookies
Category: Cookies
See: https://www.w3.org/TR/webdriver1/#delete-all-cookies
Delete the cookie with name COOKIE-NAME.
Category: Cookies
See: https://www.w3.org/TR/webdriver1/#delete-cookie
Delete the WebDriver SESSION.
Category: 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
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).
Return the ELEMENT’s attribute named NAME.
Category: Elements
Clear the contents of ELEMENT (for example, a form field element).
Category: Element interaction
See: https://www.w3.org/TR/webdriver1/#dfn-element-clear.
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 .
Returns T if ELEMENT is visible.
Category: Elements
See: https://www.w3.org/TR/webdriver1/#element-displayedness .
Returns T if ELEMENT is enabled.
Category: Elements
See: https://www.w3.org/TR/webdriver1/#is-element-enabled .
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
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 .
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 .
Return the ELEMENT’s tag name.
Category: Elements
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 .
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 .
Retrieve the cookie with name COOKIE-NAME.
Category: Cookies
See: https://www.w3.org/TR/webdriver1/#get-named-cookie
Find element by SELECTOR. Returns NIL if the element is not found.
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 .
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 .
Find elements that match VALUE using location strategy in BY.
Category: Elements
See FIND-ELEMENT.
See https://www.w3.org/TR/webdriver1/#find-elements .
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 .
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
Get value of COOKIE at NAME.
Returns the window handle associated with the current top-level browsing context.
See: https://www.w3.org/TR/webdriver1/#get-window-handle
Category: Contexts
Returns the window handles associated with ech top-level browsing context.
See: https://www.w3.org/TR/webdriver1/#get-window-handles
Category: Contexts
Get active element id.
Returns a string with KEY’s codepoint.
Category: Actions
See: https://www.w3.org/TR/webdriver/#keyboard-actions
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
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 .
Return the logs of a particular TYPE. See: LOG-TYPES.
Create a cookie object.
Category: Cookies
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 .
Merge two capabilities
Category: Capabilities
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
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
Create a new top-level browsing context.
Category: Contexts
See: https://w3c.github.io/webdriver/#new-window
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
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 .
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
Refresh the current page.
Category: Navigation
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 .
Send a key to active element.
Send keys to active element.
Start an interactive session. Use this to interact with Selenium driver from a REPL.
Category: Session
See: MAKE-SESSION
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
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
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
Get active element’s text.
Get the current url in session.
Category: Navigation
See: https://www.w3.org/TR/webdriver1/#dfn-get-current-url .
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 .
Make SESSION the current session.
Category: Session
Wait for an element that matches SELECTOR to appear on the screen. TIMEOUT indicates how much time to wait (default is *TIMEOUT*).
Get WebDriver status information
protocol-error
) stream) ¶Error signaled when no such element is found.
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
The name of the cookie
:name
The cookie value
:value
The cookie path. Defaults to ’/’ if omitted when adding a cookie.
:path
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.
:domain
Whether the cookie is a secure cookie. Defaults to false if omitted when adding a cookie.
:secure
Whether the cookie is an HTTP only cookie. Defaults to false if omitted when adding a cookie.
:http-only
When the cookie expires, specified in seconds since Unix Epoch. Must not be set if omitted when adding a cookie.
:expiry
See https://www.w3.org/TR/webdriver1/#keyboard-actions
The current Selenium WebDriver session.
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 .
Validates the status of Selenium Webdriver response.
Signal the correct type of error depending on PROTOCOL-ERROR-STATUS.
See: https://www.w3.org/TR/webdriver1/#handling-errors
Check if LIST is a property list with keyword keys.
Check if LIST is a property list.
protocol-error
)) ¶body
.
protocol-error
)) ¶(error "must supply :id")
:id
This slot is read-only.
A Selenium Webdriver session.
The server should maintain one browser per session. Commands sent to a session will be directed to the corresponding browser.
(error "must supply an id")
:id
This slot is read-only.
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 .
Jump to: | (
A B C D E F G H I K L M N P R S T U V W |
---|
Jump to: | (
A B C D E F G H I K L M N P R S T U V W |
---|
Jump to: | *
A B D E F H I N P S V |
---|
Jump to: | *
A B D E F H I N P S V |
---|
Jump to: | A C E F H K M N P S T U W |
---|
Jump to: | A C E F H K M N P S T U W |
---|