Typed event-wait values and event capture orchestration.
Download events accept:
:timeout(non_neg_integer/0) - Maximum time in milliseconds to wait for the operation. Playwright browser bookkeeping and navigation synchronization use the session timeout separately.:max_bytes(non_neg_integer/0) - Maximum number of response bytes to retain; defaults to 10,000,000.
Dialog events accept:
:timeout(non_neg_integer/0) - Maximum time in milliseconds to wait for the operation. Playwright browser bookkeeping and navigation synchronization use the session timeout separately.:decision(:accept,:dismiss,{:accept, prompt_text}, or a one-argument function) - Accept, dismiss, accept with prompt text, or decide from the captured dialog.:accept(trueorString.t/0) - Compatibility shorthand for accepting, optionally with prompt text.:dismiss(true) - Compatibility shorthand for dismissing the dialog.
File-chooser, popup, navigation, request, and response events accept the shared timeout option:
:timeout(non_neg_integer/0) - Maximum time in milliseconds to wait for the operation. Playwright browser bookkeeping and navigation synchronization use the session timeout separately.
Summary
Functions
Captures the browser file chooser opened by the action.
Captures a new page opened by the action. Requires Playwright.
Types
@type dialog_option() :: {:timeout, non_neg_integer()} | {:decision, :accept | :dismiss | {:accept, String.t()} | (Fluffy.Dialog.t() -> :accept | :dismiss | {:accept, String.t()})} | {:accept, true | String.t()} | {:dismiss, true}
@type download_option() :: {:timeout, non_neg_integer()} | {:max_bytes, non_neg_integer()}
@type network_option() :: {:timeout, non_neg_integer()} | {:matcher, String.t() | Regex.t() | (term() -> boolean())}
@type option() :: timeout_option() | download_option() | dialog_option() | network_option()
@type timeout_option() :: {:timeout, non_neg_integer()}
@type type() ::
:dialog
| :download
| :file_chooser
| :navigation
| :page
| :request
| :response
Functions
@spec dialog(term(), [dialog_option()]) :: t()
@spec download(term(), [download_option()]) :: t()
@spec file_chooser(term(), [timeout_option()]) :: t()
Captures the browser file chooser opened by the action.
@spec popup(term(), [timeout_option()]) :: t()
Captures a new page opened by the action. Requires Playwright.