Option map to Playwright Java options object conversion.
Converts idiomatic Clojure maps to Playwright's typed option objects. All functions use reflection-free type hints.
Option map to Playwright Java options object conversion. Converts idiomatic Clojure maps to Playwright's typed option objects. All functions use reflection-free type hints.
(->check-options opts)Converts a map to Locator$CheckOptions.
Converts a map to Locator$CheckOptions.
(->click-options opts)Converts a map to Locator$ClickOptions.
Params:
opts - Map with optional keys:
:button - Keyword. :left :right :middle.
:click-count - Long. Number of clicks.
:delay - Double. Delay between mousedown/mouseup in ms.
:force - Boolean. Bypass actionability checks.
:modifiers - Vector of keywords. :alt :control :meta :shift.
:no-wait-after - Boolean.
:position - Map with :x :y.
:timeout - Double. Maximum time in ms.
:trial - Boolean. Perform actionability checks only.
Returns: Locator$ClickOptions instance.
Converts a map to Locator$ClickOptions. Params: `opts` - Map with optional keys: :button - Keyword. :left :right :middle. :click-count - Long. Number of clicks. :delay - Double. Delay between mousedown/mouseup in ms. :force - Boolean. Bypass actionability checks. :modifiers - Vector of keywords. :alt :control :meta :shift. :no-wait-after - Boolean. :position - Map with :x :y. :timeout - Double. Maximum time in ms. :trial - Boolean. Perform actionability checks only. Returns: Locator$ClickOptions instance.
(->cookie opts)Creates a Cookie instance from a map.
Params:
opts - Map with optional keys:
:name - String. Cookie name.
:value - String. Cookie value.
:domain - String.
:path - String.
:expires - Double. Unix timestamp.
:http-only - Boolean.
:secure - Boolean.
:same-site - Keyword (:strict :lax :none).
Returns: Cookie instance.
Creates a Cookie instance from a map. Params: `opts` - Map with optional keys: :name - String. Cookie name. :value - String. Cookie value. :domain - String. :path - String. :expires - Double. Unix timestamp. :http-only - Boolean. :secure - Boolean. :same-site - Keyword (:strict :lax :none). Returns: Cookie instance.
(->dblclick-options opts)Converts a map to Locator$DblclickOptions.
Converts a map to Locator$DblclickOptions.
(->dispatch-event-options opts)Converts a map to Locator$DispatchEventOptions.
Converts a map to Locator$DispatchEventOptions.
(->drag-to-options opts)Converts a map to Locator$DragToOptions.
Converts a map to Locator$DragToOptions.
(->eh-check-options opts)Converts a map to ElementHandle$CheckOptions.
Converts a map to ElementHandle$CheckOptions.
(->eh-click-options opts)Converts a map to ElementHandle$ClickOptions.
Converts a map to ElementHandle$ClickOptions.
(->eh-dblclick-options opts)Converts a map to ElementHandle$DblclickOptions.
Converts a map to ElementHandle$DblclickOptions.
(->eh-fill-options opts)Converts a map to ElementHandle$FillOptions.
Converts a map to ElementHandle$FillOptions.
(->eh-hover-options opts)Converts a map to ElementHandle$HoverOptions.
Converts a map to ElementHandle$HoverOptions.
(->eh-press-options opts)Converts a map to ElementHandle$PressOptions.
Converts a map to ElementHandle$PressOptions.
(->eh-screenshot-options opts)Converts a map to ElementHandle$ScreenshotOptions.
Converts a map to ElementHandle$ScreenshotOptions.
(->eh-scroll-into-view-options opts)Converts a map to ElementHandle$ScrollIntoViewIfNeededOptions.
Converts a map to ElementHandle$ScrollIntoViewIfNeededOptions.
(->eh-select-option-options opts)Converts a map to ElementHandle$SelectOptionOptions.
Converts a map to ElementHandle$SelectOptionOptions.
(->eh-set-input-files-options opts)Converts a map to ElementHandle$SetInputFilesOptions.
Converts a map to ElementHandle$SetInputFilesOptions.
(->eh-tap-options opts)Converts a map to ElementHandle$TapOptions.
Converts a map to ElementHandle$TapOptions.
(->eh-type-options opts)Converts a map to ElementHandle$TypeOptions.
Converts a map to ElementHandle$TypeOptions.
(->eh-uncheck-options opts)Converts a map to ElementHandle$UncheckOptions.
Converts a map to ElementHandle$UncheckOptions.
(->eh-wait-for-element-state-options opts)Converts a map to ElementHandle$WaitForElementStateOptions. Note: state is passed as first arg to ElementHandle.waitForElementState(), not set on the options object. This builder only handles timeout.
Converts a map to ElementHandle$WaitForElementStateOptions. Note: state is passed as first arg to ElementHandle.waitForElementState(), not set on the options object. This builder only handles timeout.
(->emulate-media-options opts)Converts a map to Page$EmulateMediaOptions.
Converts a map to Page$EmulateMediaOptions.
(->fill-options opts)Converts a map to Locator$FillOptions.
Params:
opts - Map with optional keys:
:force - Boolean.
:no-wait-after - Boolean.
:timeout - Double.
Returns: Locator$FillOptions instance.
Converts a map to Locator$FillOptions. Params: `opts` - Map with optional keys: :force - Boolean. :no-wait-after - Boolean. :timeout - Double. Returns: Locator$FillOptions instance.
(->focus-options opts)Converts a map to Locator$FocusOptions.
Converts a map to Locator$FocusOptions.
(->frame-add-script-tag-options opts)Converts a map to Frame$AddScriptTagOptions.
Converts a map to Frame$AddScriptTagOptions.
(->frame-add-style-tag-options opts)Converts a map to Frame$AddStyleTagOptions.
Converts a map to Frame$AddStyleTagOptions.
(->frame-navigate-options opts)Converts a map to Frame$NavigateOptions.
Converts a map to Frame$NavigateOptions.
(->frame-set-content-options opts)Converts a map to Frame$SetContentOptions.
Converts a map to Frame$SetContentOptions.
(->frame-wait-for-function-options opts)Converts a map to Frame$WaitForFunctionOptions.
Converts a map to Frame$WaitForFunctionOptions.
(->frame-wait-for-selector-options opts)Converts a map to Frame$WaitForSelectorOptions.
Converts a map to Frame$WaitForSelectorOptions.
(->frame-wait-for-url-options opts)Converts a map to Frame$WaitForURLOptions.
Converts a map to Frame$WaitForURLOptions.
(->get-attribute-options opts)Converts a map to Locator$GetAttributeOptions.
Converts a map to Locator$GetAttributeOptions.
(->get-by-role-options opts)Converts a map to Page$GetByRoleOptions.
Params:
opts - Map with optional keys:
:name - String or Pattern. Accessible name to match.
:exact - Boolean. Exact match for name (case-sensitive, whole-string).
:checked - Boolean. Match checked state (aria-checked).
:disabled - Boolean. Match disabled state (aria-disabled).
:expanded - Boolean. Match expanded state (aria-expanded).
:include-hidden - Boolean. Include hidden elements.
:level - Integer. Heading level (for heading, listitem, row, treeitem).
:pressed - Boolean. Match pressed state (aria-pressed).
:selected - Boolean. Match selected state (aria-selected).
Returns: Page$GetByRoleOptions instance.
Converts a map to Page$GetByRoleOptions. Params: `opts` - Map with optional keys: :name - String or Pattern. Accessible name to match. :exact - Boolean. Exact match for name (case-sensitive, whole-string). :checked - Boolean. Match checked state (aria-checked). :disabled - Boolean. Match disabled state (aria-disabled). :expanded - Boolean. Match expanded state (aria-expanded). :include-hidden - Boolean. Include hidden elements. :level - Integer. Heading level (for heading, listitem, row, treeitem). :pressed - Boolean. Match pressed state (aria-pressed). :selected - Boolean. Match selected state (aria-selected). Returns: Page$GetByRoleOptions instance.
(->go-back-options opts)Converts a map to Page$GoBackOptions.
Converts a map to Page$GoBackOptions.
(->go-forward-options opts)Converts a map to Page$GoForwardOptions.
Converts a map to Page$GoForwardOptions.
(->hover-options opts)Converts a map to Locator$HoverOptions.
Converts a map to Locator$HoverOptions.
(->inner-html-options opts)Converts a map to Locator$InnerHTMLOptions.
Converts a map to Locator$InnerHTMLOptions.
(->inner-text-options opts)Converts a map to Locator$InnerTextOptions.
Converts a map to Locator$InnerTextOptions.
(->input-value-options opts)Converts a map to Locator$InputValueOptions.
Converts a map to Locator$InputValueOptions.
(->is-checked-options opts)Converts a map to Locator$IsCheckedOptions.
Converts a map to Locator$IsCheckedOptions.
(->is-disabled-options opts)Converts a map to Locator$IsDisabledOptions.
Converts a map to Locator$IsDisabledOptions.
(->is-editable-options opts)Converts a map to Locator$IsEditableOptions.
Converts a map to Locator$IsEditableOptions.
(->is-enabled-options opts)Converts a map to Locator$IsEnabledOptions.
Converts a map to Locator$IsEnabledOptions.
(->is-hidden-options opts)Converts a map to Locator$IsHiddenOptions.
Converts a map to Locator$IsHiddenOptions.
(->is-visible-options opts)Converts a map to Locator$IsVisibleOptions.
Converts a map to Locator$IsVisibleOptions.
(->keyboard-press-options opts)Converts a map to Keyboard$PressOptions.
Converts a map to Keyboard$PressOptions.
(->keyboard-type-options opts)Converts a map to Keyboard$TypeOptions.
Converts a map to Keyboard$TypeOptions.
(->launch-options opts)Converts a map to BrowserType$LaunchOptions.
Params:
opts - Map with optional keys:
:headless - Boolean. Run in headless mode (default: true).
:slow-mo - Double. Slow down operations by ms.
:timeout - Double. Maximum time in ms to wait for browser launch.
:channel - String. Browser channel (e.g. "chrome", "msedge").
:args - Vector of strings. Additional browser args.
:chromium-sandbox - Boolean. Enable Chromium sandbox.
:downloads-path - String. Path to download files.
:executable-path - String. Path to browser executable.
:proxy - Map with :server, :bypass, :username, :password.
Returns: BrowserType$LaunchOptions instance.
Converts a map to BrowserType$LaunchOptions. Params: `opts` - Map with optional keys: :headless - Boolean. Run in headless mode (default: true). :slow-mo - Double. Slow down operations by ms. :timeout - Double. Maximum time in ms to wait for browser launch. :channel - String. Browser channel (e.g. "chrome", "msedge"). :args - Vector of strings. Additional browser args. :chromium-sandbox - Boolean. Enable Chromium sandbox. :downloads-path - String. Path to download files. :executable-path - String. Path to browser executable. :proxy - Map with :server, :bypass, :username, :password. Returns: BrowserType$LaunchOptions instance.
(->launch-persistent-context-options opts)Converts a map to BrowserType$LaunchPersistentContextOptions.
Combines launch options (headless, args, proxy, etc.) and context options
(viewport, user-agent, storage-state, etc.) into a single options object.
Used with BrowserType.launchPersistentContext which returns a BrowserContext
directly (not a Browser).
Params:
opts - Map with optional keys:
;; Launch options
:headless - Boolean. Run in headless mode (default: true).
:slow-mo - Double. Slow down operations by ms.
:timeout - Double. Maximum time in ms to wait for browser launch.
:channel - String. Browser channel (e.g. "chrome", "msedge").
:args - Vector of strings. Additional browser args.
:chromium-sandbox - Boolean. Enable Chromium sandbox.
:downloads-path - String. Path to download files.
:executable-path - String. Path to browser executable.
:proxy - Map with :server, :bypass, :username, :password.
;; Context options
:viewport - Map with :width :height, or nil to disable.
:screen - Map with :width :height.
:user-agent - String.
:locale - String (e.g. "en-US").
:timezone-id - String (e.g. "America/New_York").
:permissions - Vector of strings.
:ignore-https-errors - Boolean.
:java-script-enabled - Boolean.
:bypass-csp - Boolean.
:device-scale-factor - Double.
:is-mobile - Boolean.
:has-touch - Boolean.
:base-url - String.
:accept-downloads - Boolean.
:offline - Boolean.
:extra-http-headers - Map of string->string.
Returns: BrowserType$LaunchPersistentContextOptions instance.
Converts a map to BrowserType$LaunchPersistentContextOptions. Combines launch options (headless, args, proxy, etc.) and context options (viewport, user-agent, storage-state, etc.) into a single options object. Used with `BrowserType.launchPersistentContext` which returns a BrowserContext directly (not a Browser). Params: `opts` - Map with optional keys: ;; Launch options :headless - Boolean. Run in headless mode (default: true). :slow-mo - Double. Slow down operations by ms. :timeout - Double. Maximum time in ms to wait for browser launch. :channel - String. Browser channel (e.g. "chrome", "msedge"). :args - Vector of strings. Additional browser args. :chromium-sandbox - Boolean. Enable Chromium sandbox. :downloads-path - String. Path to download files. :executable-path - String. Path to browser executable. :proxy - Map with :server, :bypass, :username, :password. ;; Context options :viewport - Map with :width :height, or nil to disable. :screen - Map with :width :height. :user-agent - String. :locale - String (e.g. "en-US"). :timezone-id - String (e.g. "America/New_York"). :permissions - Vector of strings. :ignore-https-errors - Boolean. :java-script-enabled - Boolean. :bypass-csp - Boolean. :device-scale-factor - Double. :is-mobile - Boolean. :has-touch - Boolean. :base-url - String. :accept-downloads - Boolean. :offline - Boolean. :extra-http-headers - Map of string->string. Returns: BrowserType$LaunchPersistentContextOptions instance.
(->locator-screenshot-options opts)Converts a map to Locator$ScreenshotOptions.
Converts a map to Locator$ScreenshotOptions.
(->mouse-click-options opts)Converts a map to Mouse$ClickOptions.
Converts a map to Mouse$ClickOptions.
(->mouse-dblclick-options opts)Converts a map to Mouse$DblclickOptions.
Converts a map to Mouse$DblclickOptions.
(->mouse-down-options opts)Converts a map to Mouse$DownOptions.
Converts a map to Mouse$DownOptions.
(->mouse-move-options opts)Converts a map to Mouse$MoveOptions.
Converts a map to Mouse$MoveOptions.
(->mouse-up-options opts)Converts a map to Mouse$UpOptions.
Converts a map to Mouse$UpOptions.
(->navigate-options opts)Converts a map to Page$NavigateOptions.
Params:
opts - Map with optional keys:
:timeout - Double. Maximum time in ms.
:wait-until - Keyword. :load :domcontentloaded :networkidle :commit.
:referer - String. Referer header.
Returns: Page$NavigateOptions instance.
Converts a map to Page$NavigateOptions. Params: `opts` - Map with optional keys: :timeout - Double. Maximum time in ms. :wait-until - Keyword. :load :domcontentloaded :networkidle :commit. :referer - String. Referer header. Returns: Page$NavigateOptions instance.
(->new-context-options opts)Converts a map to Browser$NewContextOptions.
Params:
opts - Map with optional keys:
:viewport - Map with :width :height or nil to disable.
:screen - Map with :width :height.
:user-agent - String.
:locale - String (e.g. "en-US").
:timezone-id - String (e.g. "America/New_York").
:geolocation - Map with :latitude :longitude :accuracy.
:permissions - Vector of strings.
:color-scheme - Keyword (:light :dark :no-preference).
:ignore-https-errors - Boolean.
:java-script-enabled - Boolean.
:bypass-csp - Boolean.
:device-scale-factor - Double.
:is-mobile - Boolean.
:has-touch - Boolean.
:base-url - String.
:storage-state - String (path or JSON).
:accept-downloads - Boolean.
:offline - Boolean.
:extra-http-headers - Map of string->string.
:record-video-dir - String.
:record-video-size - Map with :width :height.
:record-har-path - String. Path to write HAR file.
:record-har-mode - Keyword. :full (default) or :minimal.
:record-har-content - Keyword. :embed (default), :attach, or :omit.
:record-har-omit-content - Boolean. Shorthand for omitting content.
:record-har-url-filter - String. Glob pattern to filter URLs.
Returns: Browser$NewContextOptions instance.
Converts a map to Browser$NewContextOptions. Params: `opts` - Map with optional keys: :viewport - Map with :width :height or nil to disable. :screen - Map with :width :height. :user-agent - String. :locale - String (e.g. "en-US"). :timezone-id - String (e.g. "America/New_York"). :geolocation - Map with :latitude :longitude :accuracy. :permissions - Vector of strings. :color-scheme - Keyword (:light :dark :no-preference). :ignore-https-errors - Boolean. :java-script-enabled - Boolean. :bypass-csp - Boolean. :device-scale-factor - Double. :is-mobile - Boolean. :has-touch - Boolean. :base-url - String. :storage-state - String (path or JSON). :accept-downloads - Boolean. :offline - Boolean. :extra-http-headers - Map of string->string. :record-video-dir - String. :record-video-size - Map with :width :height. :record-har-path - String. Path to write HAR file. :record-har-mode - Keyword. :full (default) or :minimal. :record-har-content - Keyword. :embed (default), :attach, or :omit. :record-har-omit-content - Boolean. Shorthand for omitting content. :record-har-url-filter - String. Glob pattern to filter URLs. Returns: Browser$NewContextOptions instance.
(->new-page-options opts)Converts a map to Browser$NewPageOptions.
Same shape as ->new-context-options (extends the same base).
Converts a map to Browser$NewPageOptions. Same shape as ->new-context-options (extends the same base).
(->page-add-script-tag-options opts)Converts a map to Page$AddScriptTagOptions.
Converts a map to Page$AddScriptTagOptions.
(->page-add-style-tag-options opts)Converts a map to Page$AddStyleTagOptions.
Converts a map to Page$AddStyleTagOptions.
(->page-wait-for-function-options opts)Converts a map to Page$WaitForFunctionOptions.
Converts a map to Page$WaitForFunctionOptions.
(->page-wait-for-url-options opts)Converts a map to Page$WaitForURLOptions.
Converts a map to Page$WaitForURLOptions.
(->pdf-options opts)Converts a map to Page$PdfOptions.
Converts a map to Page$PdfOptions.
(->press-options opts)Converts a map to Locator$PressOptions.
Converts a map to Locator$PressOptions.
(->reload-options opts)Converts a map to Page$ReloadOptions.
Converts a map to Page$ReloadOptions.
(->screen-size opts)Creates a ScreenSize instance.
Params:
opts - Map with :width and :height.
Returns: ScreenSize instance.
Creates a ScreenSize instance. Params: `opts` - Map with :width and :height. Returns: ScreenSize instance.
(->screenshot-options opts)Converts a map to Page$ScreenshotOptions.
Params:
opts - Map with optional keys:
:path - String. File path to save screenshot.
:full-page - Boolean. Full scrollable page (default: false).
:clip - Map with :x :y :width :height.
:type - Keyword. :png or :jpeg.
:quality - Long. JPEG quality 0-100.
:timeout - Double. Maximum time in ms.
:omit-background - Boolean.
Returns: Page$ScreenshotOptions instance.
Converts a map to Page$ScreenshotOptions. Params: `opts` - Map with optional keys: :path - String. File path to save screenshot. :full-page - Boolean. Full scrollable page (default: false). :clip - Map with :x :y :width :height. :type - Keyword. :png or :jpeg. :quality - Long. JPEG quality 0-100. :timeout - Double. Maximum time in ms. :omit-background - Boolean. Returns: Page$ScreenshotOptions instance.
(->scroll-into-view-options opts)Converts a map to Locator$ScrollIntoViewIfNeededOptions.
Converts a map to Locator$ScrollIntoViewIfNeededOptions.
(->select-option-options opts)Converts a map to Locator$SelectOptionOptions.
Converts a map to Locator$SelectOptionOptions.
(->set-content-options opts)Converts a map to Page$SetContentOptions.
Converts a map to Page$SetContentOptions.
(->set-input-files-options opts)Converts a map to Locator$SetInputFilesOptions.
Converts a map to Locator$SetInputFilesOptions.
(->storage-state-options opts)Converts a map to BrowserContext$StorageStateOptions.
Converts a map to BrowserContext$StorageStateOptions.
(->tap-options opts)Converts a map to Locator$TapOptions.
Converts a map to Locator$TapOptions.
(->text-content-options opts)Converts a map to Locator$TextContentOptions.
Converts a map to Locator$TextContentOptions.
(->tracing-start-options opts)Converts a map to Tracing$StartOptions.
Converts a map to Tracing$StartOptions.
(->tracing-stop-options opts)Converts a map to Tracing$StopOptions.
Converts a map to Tracing$StopOptions.
(->type-options opts)Converts a map to Locator$TypeOptions.
Converts a map to Locator$TypeOptions.
(->uncheck-options opts)Converts a map to Locator$UncheckOptions.
Converts a map to Locator$UncheckOptions.
(->viewport-size opts)Creates a ViewportSize instance.
Params:
opts - Map with :width and :height.
Returns: ViewportSize instance.
Creates a ViewportSize instance. Params: `opts` - Map with :width and :height. Returns: ViewportSize instance.
(->wait-for-download-options opts)Converts a map to Page$WaitForDownloadOptions.
Converts a map to Page$WaitForDownloadOptions.
(->wait-for-file-chooser-options opts)Converts a map to Page$WaitForFileChooserOptions.
Converts a map to Page$WaitForFileChooserOptions.
(->wait-for-options opts)Converts a map to Locator$WaitForOptions.
Converts a map to Locator$WaitForOptions.
(->wait-for-popup-options opts)Converts a map to Page$WaitForPopupOptions.
Converts a map to Page$WaitForPopupOptions.
(->wait-for-request-finished-options opts)Converts a map to Page$WaitForRequestFinishedOptions.
Converts a map to Page$WaitForRequestFinishedOptions.
(->wait-for-request-options opts)Converts a map to Page$WaitForRequestOptions.
Converts a map to Page$WaitForRequestOptions.
(->wait-for-response-options opts)Converts a map to Page$WaitForResponseOptions.
Converts a map to Page$WaitForResponseOptions.
(->wait-for-selector-options opts)Converts a map to Page$WaitForSelectorOptions.
Converts a map to Page$WaitForSelectorOptions.
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 |