hara.runtime.chromedriver
browser:create
added in 4.0
(browser:create {:keys [id port], :as m, :or {id (h/sid), port (h/port:check-available 0)}})creates a browser
current-tab
added in 4.0
(current-tab browser)returns the active tab handle of the browser
evaluate
(evaluate browser expression & [{:keys [allow-unsafe-eval-blocked-by-csp await-promise context-id disable-breaks generate-preview include-command-line-api object-group repl-mode return-by-value silent throw-on-side-effect timeout unique-context-id user-gesture], :as m} timeout opts])screenshot
(screenshot browser & [{:keys [capture-beyond-viewport clip format from-surface quality], :as m} timeout opts])tab-create
added in 4.0
(tab-create browser url & [opts timeout extra-opts])creates a new tab and returns a tab handle
tab-switch
added in 4.0
(tab-switch browser tab & [{:keys [bootstrap], :or {bootstrap true}}])switches the browser runtime to the given tab handle. bootstraps the tab by default so that !.js forms work there.
target-create
(target-create browser url & [{:keys [background browser-context-id enable-begin-frame-control height new-window width], :as m} timeout opts])with-tab
macro
added in 4.0
(with-tab browser tab & body)evaluates body with the browser switched to tab, then restores the previously active tab