Back to Library
UI
Modal Interaction Stability
Prompt
Generate a Playwright test that opens modal, waits for visibility, interacts with elements, and ensures modal closes correctly.
Example Code
await page.click('#open-modal'); await expect(page.locator('.modal')).toBeVisible(); await page.click('.close'); await expect(page.locator('.modal')).toBeHidden();Quick Actions
PRO TIP
Paste this prompt as a comment in your .spec.ts file and let Copilot generate the test.