Liking cljdoc? Tell your friends :D

testing.repl

nREPL helper for interactive Playwright browser exploration.

Start with: clj -M:nrepl

Then connect your editor to port 7888 (or whatever is printed).

Quick reference: (require '[testing.repl :refer [page ctx restart stop]])

(.navigate @page "https://example.com") (.textContent (.locator @page "h1")) (.screenshot @page) (.title @page)

(restart) ;; fresh browser (stop) ;; close browser

nREPL helper for interactive Playwright browser exploration.

Start with:
  clj -M:nrepl

Then connect your editor to port 7888 (or whatever is printed).

Quick reference:
  (require '[testing.repl :refer [page ctx restart stop]])

  (.navigate @page "https://example.com")
  (.textContent (.locator @page "h1"))
  (.screenshot @page)
  (.title @page)

  (restart)   ;; fresh browser
  (stop)      ;; close browser
raw docstring

-mainclj

(-main & args)

Start nREPL server and a browser for interactive exploration. Args: [port & namespaces]; the namespaces are required once the browser is up, e.g. an app's explore helpers.

Start nREPL server and a browser for interactive exploration.
Args: [port & namespaces]; the namespaces are required once the browser
is up, e.g. an app's explore helpers.
raw docstring

ctxclj

Atom holding the current BrowserContext. Deref with @ctx.

Atom holding the current BrowserContext.  Deref with @ctx.
raw docstring

pageclj

Atom holding the current Playwright Page. Deref with @page.

Atom holding the current Playwright Page.  Deref with @page.
raw docstring

restartclj

(restart)

Close any existing browser and launch a fresh Chromium, headed unless -Dplaywright.browser.headless=true. Returns the Page object.

Close any existing browser and launch a fresh Chromium, headed unless
-Dplaywright.browser.headless=true. Returns the Page object.
raw docstring

stopclj

(stop)

Close the browser (if running).

Close the browser (if running).
raw 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