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
(-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.
Atom holding the current BrowserContext. Deref with @ctx.
Atom holding the current BrowserContext. Deref with @ctx.
Atom holding the current Playwright Page. Deref with @page.
Atom holding the current Playwright Page. Deref with @page.
(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.
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 |