Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions
Jump to navigation
Jump to search
Udemy Playwright: Web Automation Testing From Zero to Hero (view source)
Revision as of 05:05, 24 May 2024
, 24 May→Dailog Boxes
m (→Tooltips) |
m (→Dailog Boxes) |
||
Line 477: | Line 477: | ||
=== Dailog Boxes === | === Dailog Boxes === | ||
<nowiki>test("Dialog box", async ({ page }) => { | |||
await page.getByText("Tables & Data").click() | |||
await page.locator(".menu-item").getByText("Smart Table").click() | |||
page.on("dialog", (dialog) => { | |||
expect(dialog.message()).toEqual("Are you sure you want to delete?") | |||
dialog.accept() | |||
}) | |||
const email = "mdo@gmail.com" | |||
await page | |||
.getByRole("table") | |||
.locator("tr", { hasText: email }) | |||
.locator(".nb-trash") | |||
.click() | |||
await expect(page.locator("table tr").first()).not.toHaveText(email) | |||
})</nowiki> | |||
=== Web Tables === | === Web Tables === | ||
=== Date Picker === | === Date Picker === | ||
=== Sliders === | === Sliders === | ||
=== Drag & Drop with iFrames === | === Drag & Drop with iFrames === |