MCPcopy Create free account
hub / github.com/Rello/analytics / dismissToast

Function dismissToast

tests/playwright/common.js:622–630  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

620}
621
622async function dismissToast(page) {
623 const closeButton = page.locator('.toast-close, [role="status"] button[aria-label="Close"]').last();
624 const visible = await closeButton.isVisible().catch(() => false);
625 if (!visible) {
626 return false;
627 }
628 await closeButton.click();
629 return true;
630}
631
632async function waitForToastAndDismiss(page, timeout = 15000) {
633 await waitForToast(page, timeout);

Callers 1

waitForToastAndDismissFunction · 0.85

Calls 2

isVisibleMethod · 0.80
lastMethod · 0.45

Tested by

no test coverage detected