Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: remove toc and api reference (#17098)
Debbie O'Brienca753e1884a5
diff --git a/docs/src/dialogs.md b/docs/src/dialogs.mdindex db4a241d92..6dd5bac06e 100644--- a/docs/src/dialogs.md+++ b/docs/src/dialogs.md@@ -7,7 +7,7 @@ Playwright can interact with the web page dialogs such as [`alert`](https://deve## alert(), confirm(), prompt() dialogs-By default, dialogs are auto-dismissed by Playwright, so you don't have to handle them. However, you can register a dialog handler before the action that triggers the dialog to accept or decline it.+By default, dialogs are auto-dismissed by Playwright, so you don't have to handle them. However, you can register a dialog handler before the action that triggers the dialog to either [`method: Dialog.accept`] or [`method: Dialog.dismiss`] it.```jspage.on('dialog', dialog => dialog.accept());@@ -35,7 +35,7 @@ await page.Locator("button").ClickAsync();```:::note-[`event: Page.dialog`] listener **must handle** the dialog. Otherwise your action will stall, be it [`method: Page.click`], [`method: Page.evaluate`] or any other. That's because dialogs in Web are modals and therefore block further page execution until they are handled.+[`event: Page.dialog`] listener **must handle** the dialog. Otherwise your action will stall, be it [`method: Locator.click`] or something else. That's because dialogs in Web are modals and therefore block further page execution until they are handled.:::As a result, the following snippet will never resolve:@@ -73,12 +73,6 @@ await page.Locator("button").ClickAsync(); // Will hang hereIf there is no listener for [`event: Page.dialog`], all dialogs are automatically dismissed.:::-### API reference--- [Dialog]-- [`method: Dialog.accept`]-- [`method: Dialog.dismiss`]-## beforeunload dialogWhen [`method: Page.close`] is invoked with the truthy [`option: runBeforeUnload`] value, the page runs its unload handlers. This is the only case when [`method: Page.close`] does not wait for the page to actually close, because it might be that the page stays open in the end of the operation.