Interact with a Playwright Dialog.
There is no official documentation, since this is considered Playwright internal.
Reference: https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/client/dialog.ts
Summary
Types
@type accept_opt() :: {:connection, GenServer.name()} | {:timeout, timeout()} | {:prompt_text, binary()}
@type dismiss_opt() :: {:connection, GenServer.name()} | {:timeout, timeout()}
@type guid() :: String.t()
Functions
@spec accept(PlaywrightEx.guid(), [accept_opt() | PlaywrightEx.unknown_opt()]) :: {:ok, any()} | {:error, any()}
Returns when the dialog has been accepted.
Reference: https://playwright.dev/docs/api/class-dialog#dialog-accept
Options
:connection(term/0) - The Connection process name. Defaults toPlaywrightEx.Supervisor.Connection. The default value isPlaywrightEx.Supervisor.Connection.:timeout(timeout/0) - Required. Maximum time for the operation (milliseconds).:prompt_text(String.t/0) - A text to enter in prompt. Does not cause any effects if the dialog's type is not prompt.
@spec dismiss(PlaywrightEx.guid(), [dismiss_opt() | PlaywrightEx.unknown_opt()]) :: {:ok, any()} | {:error, any()}
Returns when the dialog has been dismissed.
Reference: https://playwright.dev/docs/api/class-dialog#dialog-dismiss