Trying to verify and expect dialog messages. but can’t able to visualize in ui and trace mode.
it displays the page context menu dialog when I run & open the Chromium browser (VS code Extension).
test("Verify Context menu dialog", async ({ page }) => {
page.on("dialog", async (dialog) => {
await page.waitForTimeout(3000);
expect(dialog.type()).toContain("alert");
expect(dialog.message()).toContain("You selected a context menu");
await dialog.accept();
});
await page.locator("#hot-spot").click({ button: "right" });
});
context menu alert dialog should be display when i execute playwright test using ui and trace mode.
New contributor
Bhushan Trivedi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.