Liking cljdoc? Tell your friends :D
Clojure only.

com.blockether.spel.sci-env

SCI (Small Clojure Interpreter) environment for native-image REPL.

Registers all spel functions as SCI namespaces so they can be evaluated in a native-image compiled REPL without JVM startup.

The SCI context wraps a stateful Playwright session with managed atoms for the Playwright, Browser, BrowserContext, and Page instances.

Namespaces available in --eval mode: spel/ - Simplified API (implicit page/context from atoms) snapshot/ - Accessibility snapshot capture annotate/ - Screenshot annotation input/ - Keyboard, Mouse, Touchscreen (raw pass-throughs) frame/ - Frame and FrameLocator operations (raw pass-throughs) net/ - Network request/response/route (raw pass-throughs) loc/ - Locator operations (raw pass-throughs, explicit Locator arg) assert/ - Assertion functions (raw pass-throughs, explicit assertion obj) core/ - Lifecycle stubs + utility pass-throughs

Usage: (def ctx (create-sci-ctx)) (eval-string ctx "(spel/start!)") (eval-string ctx "(spel/goto "https://example.com")") (eval-string ctx "(spel/snapshot)") (eval-string ctx "(spel/stop!)")

SCI (Small Clojure Interpreter) environment for native-image REPL.

Registers all spel functions as SCI namespaces so they
can be evaluated in a native-image compiled REPL without JVM startup.

The SCI context wraps a stateful Playwright session with managed
atoms for the Playwright, Browser, BrowserContext, and Page instances.

 Namespaces available in --eval mode:
   spel/     - Simplified API (implicit page/context from atoms)
  snapshot/ - Accessibility snapshot capture
  annotate/ - Screenshot annotation
  input/    - Keyboard, Mouse, Touchscreen (raw pass-throughs)
  frame/    - Frame and FrameLocator operations (raw pass-throughs)
  net/      - Network request/response/route (raw pass-throughs)
  loc/      - Locator operations (raw pass-throughs, explicit Locator arg)
  assert/   - Assertion functions (raw pass-throughs, explicit assertion obj)
  core/     - Lifecycle stubs + utility pass-throughs

Usage:
  (def ctx (create-sci-ctx))
   (eval-string ctx "(spel/start!)")
   (eval-string ctx "(spel/goto \"https://example.com\")")
   (eval-string ctx "(spel/snapshot)")
   (eval-string ctx "(spel/stop!)")
raw docstring

!browserclj

source

!contextclj

source

!daemon-mode?clj

source

!default-timeoutclj

source

!pageclj

source

!pwclj

source

!throw-on-errorclj

source

create-sci-ctxclj

(create-sci-ctx)

Creates a SCI context with all spel functions registered.

The context includes:

  • pw namespace: All REPL functions (start!, stop!, goto, click, etc.)
  • snapshot namespace: Snapshot capture and ref resolution
  • annotate namespace: Screenshot annotation
  • input namespace: Keyboard, Mouse, Touchscreen operations
  • frame namespace: Frame and FrameLocator operations
  • net namespace: Network request/response/route operations
  • loc namespace: Raw locator operations (explicit Locator arg)
  • assert namespace: Raw assertion operations (explicit assertion obj)
  • core namespace: Lifecycle stubs + utility pass-throughs

All Playwright Java classes are registered for interop.

Returns: SCI context ready for evaluation.

Creates a SCI context with all spel functions registered.

The context includes:
- `pw` namespace: All REPL functions (start!, stop!, goto, click, etc.)
- `snapshot` namespace: Snapshot capture and ref resolution
- `annotate` namespace: Screenshot annotation
- `input` namespace: Keyboard, Mouse, Touchscreen operations
- `frame` namespace: Frame and FrameLocator operations
- `net` namespace: Network request/response/route operations
- `loc` namespace: Raw locator operations (explicit Locator arg)
- `assert` namespace: Raw assertion operations (explicit assertion obj)
- `core` namespace: Lifecycle stubs + utility pass-throughs

All Playwright Java classes are registered for interop.

Returns:
SCI context ready for evaluation.
sourceraw docstring

eval-stringclj

(eval-string ctx code)

Evaluates a Clojure string in the SCI context.

Binds SCI's out/err/in to the JVM equivalents so that println, prn, etc. work correctly in --eval mode.

Params: ctx - SCI context from create-sci-ctx. code - String. Clojure code to evaluate.

Returns: Result of evaluation.

Evaluates a Clojure string in the SCI context.

Binds SCI's *out*/*err*/*in* to the JVM equivalents so that
`println`, `prn`, etc. work correctly in --eval mode.

Params:
`ctx`  - SCI context from create-sci-ctx.
`code` - String. Clojure code to evaluate.

Returns:
Result of evaluation.
sourceraw docstring

sci-$clj

(sci-$ sel-or-loc)
source

sci-$$clj

(sci-$$ sel)
source

sci-$alt-textclj

(sci-$alt-text text)
source

sci-$labelclj

(sci-$label text)
source

sci-$placeholderclj

(sci-$placeholder text)
source

sci-$roleclj

(sci-$role role)
(sci-$role role opts)
source

sci-$test-idclj

(sci-$test-id id)
source

sci-$textclj

(sci-$text text)
source

sci-$title-attrclj

(sci-$title-attr text)
source

sci-add-script-tagclj

(sci-add-script-tag opts)
source

sci-add-style-tagclj

(sci-add-style-tag opts)
source

sci-all-inner-textsclj

(sci-all-inner-texts sel)
source

sci-all-text-contentsclj

(sci-all-text-contents sel)
source

sci-annotateclj

(sci-annotate refs)
(sci-annotate refs opts)

Injects annotation overlays into the current page for visible elements. Takes refs from snapshot and optional display opts.

Injects annotation overlays into the current page for visible elements.
Takes refs from snapshot and optional display opts.
sourceraw docstring

sci-annotated-screenshotclj

(sci-annotated-screenshot refs)
(sci-annotated-screenshot refs opts)
source

sci-assert-accessible-descriptionclj

(sci-assert-accessible-description sel desc)
source

sci-assert-accessible-error-messageclj

(sci-assert-accessible-error-message sel msg)
source

sci-assert-accessible-nameclj

(sci-assert-accessible-name sel name-val)
source

sci-assert-attachedclj

(sci-assert-attached sel)
(sci-assert-attached sel opts)
source

sci-assert-attrclj

(sci-assert-attr sel attr-name value)
(sci-assert-attr sel attr-name value opts)
source

sci-assert-checkedclj

(sci-assert-checked sel)
(sci-assert-checked sel opts)
source

sci-assert-classclj

(sci-assert-class sel class-val)
(sci-assert-class sel class-val opts)
source

sci-assert-contains-classclj

(sci-assert-contains-class sel class-val)
(sci-assert-contains-class sel class-val opts)
source

sci-assert-contains-textclj

(sci-assert-contains-text sel expected)
(sci-assert-contains-text sel expected opts)
source

sci-assert-countclj

(sci-assert-count sel n)
(sci-assert-count sel n opts)
source

sci-assert-cssclj

(sci-assert-css sel css-name value)
(sci-assert-css sel css-name value opts)
source

sci-assert-disabledclj

(sci-assert-disabled sel)
(sci-assert-disabled sel opts)
source

sci-assert-editableclj

(sci-assert-editable sel)
(sci-assert-editable sel opts)
source

sci-assert-emptyclj

(sci-assert-empty sel)
source

sci-assert-enabledclj

(sci-assert-enabled sel)
(sci-assert-enabled sel opts)
source

sci-assert-focusedclj

(sci-assert-focused sel)
(sci-assert-focused sel opts)
source

sci-assert-hiddenclj

(sci-assert-hidden sel)
(sci-assert-hidden sel opts)
source

sci-assert-idclj

(sci-assert-id sel id)
(sci-assert-id sel id opts)
source

sci-assert-in-viewportclj

(sci-assert-in-viewport sel)
(sci-assert-in-viewport sel opts)
source

sci-assert-js-propertyclj

(sci-assert-js-property sel prop-name value)
source

sci-assert-matches-aria-snapshotclj

(sci-assert-matches-aria-snapshot sel snapshot-str)
source

sci-assert-notclj

(sci-assert-not sel)
source

sci-assert-page-notclj

(sci-assert-page-not)
source

sci-assert-roleclj

(sci-assert-role sel role)
source

sci-assert-textclj

(sci-assert-text sel expected)
(sci-assert-text sel expected opts)
source

sci-assert-thatclj

(sci-assert-that target)
source

sci-assert-titleclj

(sci-assert-title expected)
(sci-assert-title expected opts)
source

sci-assert-urlclj

(sci-assert-url expected)
(sci-assert-url expected opts)
source

sci-assert-valueclj

(sci-assert-value sel value)
(sci-assert-value sel value opts)
source

sci-assert-valuesclj

(sci-assert-values sel values)
(sci-assert-values sel values opts)
source

sci-assert-visibleclj

(sci-assert-visible sel)
(sci-assert-visible sel opts)
source

sci-attrclj

(sci-attr sel name)
source

sci-backclj

(sci-back)
source

sci-bboxclj

(sci-bbox sel)
source

sci-blurclj

(sci-blur sel)
source

sci-bring-to-frontclj

(sci-bring-to-front)
source

sci-browserclj

(sci-browser)

Returns the current Browser instance.

Returns the current Browser instance.
sourceraw docstring

sci-browser-connected?clj

(sci-browser-connected?)
source

sci-browser-versionclj

(sci-browser-version)
source

sci-checkclj

(sci-check sel)
(sci-check sel opts)
source

sci-checked?clj

(sci-checked? sel)
source

sci-clearclj

(sci-clear sel)
source

sci-clear-refs!clj

(sci-clear-refs!)
source

sci-clickclj

(sci-click sel)
(sci-click sel opts)
source

sci-click-refclj

(sci-click-ref ref-id)

Clicks an element identified by a snapshot ref ID.

Clicks an element identified by a snapshot ref ID.
sourceraw docstring

sci-contextclj

(sci-context)

Returns the current BrowserContext instance.

Returns the current BrowserContext instance.
sourceraw docstring

sci-context-clear-cookies!clj

(sci-context-clear-cookies!)
source

sci-context-clear-permissions!clj

(sci-context-clear-permissions!)
source

sci-context-cookiesclj

(sci-context-cookies)
source

sci-context-grant-permissions!clj

(sci-context-grant-permissions! perms)
source

sci-context-set-extra-http-headers!clj

(sci-context-set-extra-http-headers! headers)
source

sci-context-set-offline!clj

(sci-context-set-offline! offline)
source

sci-count-ofclj

(sci-count-of sel)
source

sci-dblclickclj

(sci-dblclick sel)
(sci-dblclick sel opts)
source

sci-disabled?clj

(sci-disabled? sel)
source

sci-dispatch-eventclj

(sci-dispatch-event sel type)
source

sci-drag-toclj

(sci-drag-to sel target-sel)
source

sci-editable?clj

(sci-editable? sel)
source

sci-emulate-media!clj

(sci-emulate-media! opts)
source

sci-enabled?clj

(sci-enabled? sel)
source

sci-eval-jsclj

(sci-eval-js expr)
(sci-eval-js expr arg)
source

sci-evaluate-all-locsclj

(sci-evaluate-all-locs sel expr)
(sci-evaluate-all-locs sel expr arg)
source

sci-evaluate-handleclj

(sci-evaluate-handle expr)
(sci-evaluate-handle expr arg)
source

sci-evaluate-locatorclj

(sci-evaluate-locator sel expr)
(sci-evaluate-locator sel expr arg)
source

sci-expose-binding!clj

(sci-expose-binding! binding-name f)
source

sci-expose-function!clj

(sci-expose-function! fn-name f)
source

sci-fillclj

(sci-fill sel value)
(sci-fill sel value opts)
source

sci-fill-refclj

(sci-fill-ref ref-id value)

Fills an input element identified by a snapshot ref ID.

Fills an input element identified by a snapshot ref ID.
sourceraw docstring

sci-firstclj

(sci-first sel)
source

sci-focusclj

(sci-focus sel)
source

sci-forwardclj

(sci-forward)
source

sci-frame-by-nameclj

(sci-frame-by-name name)
source

sci-frame-by-urlclj

(sci-frame-by-url pattern)
source

sci-framesclj

(sci-frames)
source

sci-full-snapshotclj

(sci-full-snapshot)
(sci-full-snapshot page)
source

sci-gotoclj

(sci-goto url)
(sci-goto url opts)
source

sci-hidden?clj

(sci-hidden? sel)
source

sci-highlightclj

(sci-highlight sel)
source

sci-hoverclj

(sci-hover sel)
(sci-hover sel opts)
source

sci-hover-refclj

(sci-hover-ref ref-id)

Hovers over an element identified by a snapshot ref ID.

Hovers over an element identified by a snapshot ref ID.
sourceraw docstring

sci-htmlclj

(sci-html)
source

sci-infoclj

(sci-info)

Returns a map with current page :url, :title, :viewport, and :closed? state.

Returns a map with current page :url, :title, :viewport, and :closed? state.
sourceraw docstring

sci-inner-htmlclj

(sci-inner-html sel)
source

sci-inner-textclj

(sci-inner-text sel)
source

sci-keyboardclj

(sci-keyboard)
source

sci-lastclj

(sci-last sel)
source

sci-last-responseclj

(sci-last-response url)

Navigates to URL and returns response info map with :status, :ok?, :url, :headers.

Navigates to URL and returns response info map with :status, :ok?, :url, :headers.
sourceraw docstring

sci-loc-filterclj

(sci-loc-filter sel opts)
source

sci-loc-get-by-labelclj

(sci-loc-get-by-label sel text)
source

sci-loc-get-by-roleclj

(sci-loc-get-by-role sel role)
source

sci-loc-get-by-test-idclj

(sci-loc-get-by-test-id sel id)
source

sci-loc-get-by-textclj

(sci-loc-get-by-text sel text)
source

sci-loc-locatorclj

(sci-loc-locator sel sub-sel)
source

sci-loc-wait-forclj

(sci-loc-wait-for sel)
(sci-loc-wait-for sel opts)
source

sci-locator-screenshotclj

(sci-locator-screenshot sel)
(sci-locator-screenshot sel opts)
source

sci-main-frameclj

(sci-main-frame)
source

sci-mouseclj

(sci-mouse)
source

sci-new-tab!clj

(sci-new-tab!)

Opens a new tab in the current context and switches to it.

Opens a new tab in the current context and switches to it.
sourceraw docstring

sci-nthclj

(sci-nth sel n)
source

sci-on-closeclj

(sci-on-close handler)
source

sci-on-consoleclj

(sci-on-console handler)
source

sci-on-dialogclj

(sci-on-dialog handler)
source

sci-on-downloadclj

(sci-on-download handler)
source

sci-on-page-errorclj

(sci-on-page-error handler)
source

sci-on-popupclj

(sci-on-popup handler)
source

sci-on-requestclj

(sci-on-request handler)
source

sci-on-responseclj

(sci-on-response handler)
source

sci-once-dialogclj

(sci-once-dialog handler)
source

sci-pageclj

(sci-page)

Returns the current Page instance.

Returns the current Page instance.
sourceraw docstring

sci-page-contextclj

(sci-page-context)
source

sci-pdfclj

(sci-pdf)
(sci-pdf path-or-opts)
source

sci-pressclj

(sci-press sel key)
(sci-press sel key opts)
source

sci-reload!clj

(sci-reload!)
source

sci-resolve-refclj

(sci-resolve-ref ref-id)
source

sci-restart!clj

(sci-restart!)
(sci-restart! opts)

Stops the current session and starts a new one with the given options.

Stops the current session and starts a new one with the given options.
sourceraw docstring

sci-route!clj

(sci-route! pattern handler)
source

sci-save-annotated-screenshot!clj

(sci-save-annotated-screenshot! refs path)
(sci-save-annotated-screenshot! refs path opts)
source

sci-screenshotclj

(sci-screenshot)
(sci-screenshot path-or-opts)
source

sci-scroll-into-viewclj

(sci-scroll-into-view sel)
source

sci-selectclj

(sci-select sel values)
source

sci-set-assertion-timeout!clj

(sci-set-assertion-timeout! ms)
source

sci-set-content!clj

(sci-set-content! html)
(sci-set-content! html opts)
source

sci-set-default-navigation-timeout!clj

(sci-set-default-navigation-timeout! ms)
source

sci-set-extra-http-headers!clj

(sci-set-extra-http-headers! headers)
source

sci-set-input-files!clj

(sci-set-input-files! sel files)
source

sci-set-page-default-timeout!clj

(sci-set-page-default-timeout! ms)
source

sci-set-viewport-size!clj

(sci-set-viewport-size! width height)
source

sci-sleepclj

(sci-sleep ms)
source

sci-snapshotclj

(sci-snapshot)
(sci-snapshot page-or-opts)
(sci-snapshot page opts)
source

sci-start!clj

(sci-start!)
(sci-start! opts)
source

sci-stop!clj

(sci-stop!)

Stops the Playwright session, closing browser and cleaning up resources.

Stops the Playwright session, closing browser and cleaning up resources.
sourceraw docstring

sci-switch-tab!clj

(sci-switch-tab! idx)

Switches to the tab at the given index.

Switches to the tab at the given index.
sourceraw docstring

sci-tabsclj

(sci-tabs)

Returns a list of all open tabs with their index, url, title, and active status.

Returns a list of all open tabs with their index, url, title, and active status.
sourceraw docstring

sci-tapclj

(sci-tap sel)
source

sci-textclj

(sci-text sel)
source

sci-titleclj

(sci-title)
source

sci-touchscreenclj

(sci-touchscreen)
source

sci-type-refclj

(sci-type-ref ref-id text)

Types text into an element identified by a snapshot ref ID.

Types text into an element identified by a snapshot ref ID.
sourceraw docstring

sci-type-textclj

(sci-type-text sel text)
(sci-type-text sel text opts)
source

sci-unannotateclj

(sci-unannotate)

Removes all annotation overlays from the current page.

Removes all annotation overlays from the current page.
sourceraw docstring

sci-uncheckclj

(sci-uncheck sel)
(sci-uncheck sel opts)
source

sci-unroute!clj

(sci-unroute! pattern)
source

sci-urlclj

(sci-url)
source

sci-valueclj

(sci-value sel)
source

sci-visible?clj

(sci-visible? sel)
source

sci-wait-forclj

(sci-wait-for sel)
(sci-wait-for sel opts)
source

sci-wait-for-downloadclj

(sci-wait-for-download action)
(sci-wait-for-download action opts)
source

sci-wait-for-file-chooserclj

(sci-wait-for-file-chooser action)
(sci-wait-for-file-chooser action opts)
source

sci-wait-for-functionclj

(sci-wait-for-function expr)
source

sci-wait-for-loadclj

(sci-wait-for-load)
(sci-wait-for-load state)
source

sci-wait-for-popupclj

(sci-wait-for-popup action)
(sci-wait-for-popup action opts)
source

sci-wait-for-urlclj

(sci-wait-for-url url)
source

set-default-timeout!clj

(set-default-timeout! ms)

Sets the default Playwright action timeout (ms) for new pages. Called from --eval mode when --timeout flag is provided.

Sets the default Playwright action timeout (ms) for new pages.
Called from --eval mode when --timeout flag is provided.
sourceraw docstring

set-throw-on-error!clj

(set-throw-on-error! v)

When true, Playwright operations throw on error instead of returning anomaly maps. Called from --eval mode so errors short-circuit (do ...) forms.

When true, Playwright operations throw on error instead of returning anomaly maps.
Called from --eval mode so errors short-circuit (do ...) forms.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close