Utility classes: Dialog, Download, ConsoleMessage, CDPSession, Clock, Tracing, Video, WebError, Worker, FileChooser, Selectors.
Utility classes: Dialog, Download, ConsoleMessage, CDPSession, Clock, Tracing, Video, WebError, Worker, FileChooser, Selectors.
(cdp-detach! session)Detaches the CDP session.
Params:
session - CDPSession instance.
Detaches the CDP session. Params: `session` - CDPSession instance.
(cdp-on session event handler)Registers a handler for CDP events.
Params:
session - CDPSession instance.
event - String. Event name.
handler - Function that receives the event data.
Registers a handler for CDP events. Params: `session` - CDPSession instance. `event` - String. Event name. `handler` - Function that receives the event data.
(cdp-send session method)(cdp-send session method params)Sends a Chrome DevTools Protocol command.
Params:
session - CDPSession instance.
method - String. CDP method name.
params - Map, optional. CDP parameters.
Returns: JSON result or anomaly map.
Sends a Chrome DevTools Protocol command. Params: `session` - CDPSession instance. `method` - String. CDP method name. `params` - Map, optional. CDP parameters. Returns: JSON result or anomaly map.
(clock-fast-forward! clock ticks)Fast-forwards the clock by the given time.
Params:
clock - Clock instance.
ticks - Long. Time to advance in ms.
Fast-forwards the clock by the given time. Params: `clock` - Clock instance. `ticks` - Long. Time to advance in ms.
(clock-install! clock)Installs fake timers on the clock.
Params:
clock - Clock instance.
Installs fake timers on the clock. Params: `clock` - Clock instance.
(clock-pause-at! clock time)Pauses the clock at the given time.
Params:
clock - Clock instance.
time - Long. Unix timestamp in ms.
Pauses the clock at the given time. Params: `clock` - Clock instance. `time` - Long. Unix timestamp in ms.
(clock-resume! clock)Resumes the clock.
Params:
clock - Clock instance.
Resumes the clock. Params: `clock` - Clock instance.
(clock-set-fixed-time! clock time)Sets the clock to a fixed time.
Params:
clock - Clock instance.
time - Long. Unix timestamp in ms.
Sets the clock to a fixed time. Params: `clock` - Clock instance. `time` - Long. Unix timestamp in ms.
(clock-set-system-time! clock time)Sets the system time.
Params:
clock - Clock instance.
time - Long. Unix timestamp in ms.
Sets the system time. Params: `clock` - Clock instance. `time` - Long. Unix timestamp in ms.
(console-args msg)Returns the console message arguments as JSHandles.
Params:
msg - ConsoleMessage instance.
Returns: Vector of JSHandle.
Returns the console message arguments as JSHandles. Params: `msg` - ConsoleMessage instance. Returns: Vector of JSHandle.
(console-location msg)Returns the source location of the console message.
Params:
msg - ConsoleMessage instance.
Returns: String. The location string.
Returns the source location of the console message. Params: `msg` - ConsoleMessage instance. Returns: String. The location string.
(console-page msg)Returns the page the console message belongs to.
Params:
msg - ConsoleMessage instance.
Returns: Page instance.
Returns the page the console message belongs to. Params: `msg` - ConsoleMessage instance. Returns: Page instance.
(console-text msg)Returns the console message text.
Params:
msg - ConsoleMessage instance.
Returns: String.
Returns the console message text. Params: `msg` - ConsoleMessage instance. Returns: String.
(console-type msg)Returns the console message type (log, debug, info, error, warning, etc).
Params:
msg - ConsoleMessage instance.
Returns: String.
Returns the console message type (log, debug, info, error, warning, etc). Params: `msg` - ConsoleMessage instance. Returns: String.
(context-tracing context)Returns the Tracing for a context.
Params:
context - BrowserContext instance.
Returns: Tracing instance.
Returns the Tracing for a context. Params: `context` - BrowserContext instance. Returns: Tracing instance.
(dialog-accept! dialog)(dialog-accept! dialog prompt-text)Accepts the dialog.
Params:
dialog - Dialog instance.
prompt-text - String, optional. Text for prompt dialogs.
Accepts the dialog. Params: `dialog` - Dialog instance. `prompt-text` - String, optional. Text for prompt dialogs.
(dialog-default-value dialog)Returns the default value for prompt dialogs.
Params:
dialog - Dialog instance.
Returns: String.
Returns the default value for prompt dialogs. Params: `dialog` - Dialog instance. Returns: String.
(dialog-dismiss! dialog)Dismisses the dialog.
Params:
dialog - Dialog instance.
Dismisses the dialog. Params: `dialog` - Dialog instance.
(dialog-message dialog)Returns the dialog message.
Params:
dialog - Dialog instance.
Returns: String.
Returns the dialog message. Params: `dialog` - Dialog instance. Returns: String.
(dialog-type dialog)Returns the dialog type (alert, confirm, prompt, beforeunload).
Params:
dialog - Dialog instance.
Returns: String.
Returns the dialog type (alert, confirm, prompt, beforeunload). Params: `dialog` - Dialog instance. Returns: String.
(download-cancel! download)Cancels the download.
Params:
download - Download instance.
Cancels the download. Params: `download` - Download instance.
(download-failure download)Returns the download failure reason, or nil.
Params:
download - Download instance.
Returns: String or nil.
Returns the download failure reason, or nil. Params: `download` - Download instance. Returns: String or nil.
(download-page download)Returns the page the download belongs to.
Params:
download - Download instance.
Returns: Page instance.
Returns the page the download belongs to. Params: `download` - Download instance. Returns: Page instance.
(download-path download)Returns the local path to the downloaded file.
Params:
download - Download instance.
Returns: Path or nil.
Returns the local path to the downloaded file. Params: `download` - Download instance. Returns: Path or nil.
(download-save-as! download path)Saves the download to the given path.
Params:
download - Download instance.
path - String. Destination path.
Saves the download to the given path. Params: `download` - Download instance. `path` - String. Destination path.
(download-suggested-filename download)Returns the suggested filename.
Params:
download - Download instance.
Returns: String.
Returns the suggested filename. Params: `download` - Download instance. Returns: String.
(download-url download)Returns the download URL.
Params:
download - Download instance.
Returns: String.
Returns the download URL. Params: `download` - Download instance. Returns: String.
(file-chooser-element fc)Returns the element handle for the file input.
Params:
fc - FileChooser instance.
Returns: ElementHandle.
Returns the element handle for the file input. Params: `fc` - FileChooser instance. Returns: ElementHandle.
(file-chooser-is-multiple? fc)Returns whether the file chooser accepts multiple files.
Params:
fc - FileChooser instance.
Returns: Boolean.
Returns whether the file chooser accepts multiple files. Params: `fc` - FileChooser instance. Returns: Boolean.
(file-chooser-page fc)Returns the page the file chooser belongs to.
Params:
fc - FileChooser instance.
Returns: Page instance.
Returns the page the file chooser belongs to. Params: `fc` - FileChooser instance. Returns: Page instance.
(file-chooser-set-files! fc files)Sets the files for the file chooser.
Params:
fc - FileChooser instance.
files - String path or vector of paths.
Sets the files for the file chooser. Params: `fc` - FileChooser instance. `files` - String path or vector of paths.
(page-clock page)Returns the Clock for a page.
Params:
page - Page instance.
Returns: Clock instance.
Returns the Clock for a page. Params: `page` - Page instance. Returns: Clock instance.
(selectors pw)Returns the Selectors for a Playwright instance.
Params:
pw - Playwright instance.
Returns: Selectors instance.
Returns the Selectors for a Playwright instance. Params: `pw` - Playwright instance. Returns: Selectors instance.
(selectors-register! sels name script)Registers a custom selector engine.
Params:
sels - Selectors instance.
name - String. Selector engine name.
script - String. JavaScript for the selector engine.
Registers a custom selector engine. Params: `sels` - Selectors instance. `name` - String. Selector engine name. `script` - String. JavaScript for the selector engine.
(tracing-start! tracing)(tracing-start! tracing trace-opts)Starts tracing.
Params:
tracing - Tracing instance.
opts - Map, optional. Tracing options.
Starts tracing. Params: `tracing` - Tracing instance. `opts` - Map, optional. Tracing options.
(tracing-stop! tracing)(tracing-stop! tracing stop-opts)Stops tracing and saves the trace file.
Params:
tracing - Tracing instance.
opts - Map, optional. {:path "trace.zip"}.
Stops tracing and saves the trace file.
Params:
`tracing` - Tracing instance.
`opts` - Map, optional. {:path "trace.zip"}.(video-delete! video)Deletes the video file.
Params:
video - Video instance.
Deletes the video file. Params: `video` - Video instance.
(video-path video)Returns the path to the video file.
Params:
video - Video instance.
Returns: Path or anomaly map.
Returns the path to the video file. Params: `video` - Video instance. Returns: Path or anomaly map.
(video-save-as! video path)Saves the video to the given path.
Params:
video - Video instance.
path - String. Destination path.
Saves the video to the given path. Params: `video` - Video instance. `path` - String. Destination path.
(web-error-error we)Returns the underlying error for this web error.
Params:
we - WebError instance.
Returns: String. The error message.
Returns the underlying error for this web error. Params: `we` - WebError instance. Returns: String. The error message.
(web-error-page we)Returns the page that generated this web error, if any.
Params:
we - WebError instance.
Returns: Page instance or nil.
Returns the page that generated this web error, if any. Params: `we` - WebError instance. Returns: Page instance or nil.
(worker-evaluate worker expression)(worker-evaluate worker expression arg)Evaluates JavaScript in the worker context.
Params:
worker - Worker instance.
expression - String.
arg - Optional argument.
Returns: Result or anomaly map.
Evaluates JavaScript in the worker context. Params: `worker` - Worker instance. `expression` - String. `arg` - Optional argument. Returns: Result or anomaly map.
(worker-url worker)Returns the worker URL.
Params:
worker - Worker instance.
Returns: String.
Returns the worker URL. Params: `worker` - Worker instance. Returns: String.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |