Playwright · Class
Dialog
A Dialog represents a browser alert, confirmation, prompt, or beforeunload dialog. Handle it from the page's dialog event, then accept or dismiss it.
Last updated
- Since
- before v1.9
Syntax
dialog.accept(prompt_text=None)
dialog.dismiss()
dialog.default_value
dialog.message
dialog.page
dialog.typeIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
page.on("dialog")acceptdismissdefault_valuemessagepagetype