Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: navigator.clipboard is present (#20402)

Yury Semikhatsky249d969d4be2
diff --git a/tests/library/capabilities.spec.ts b/tests/library/capabilities.spec.ts
index a6c48d3dd2..07fb4376a1 100644
--- a/tests/library/capabilities.spec.ts
+++ b/tests/library/capabilities.spec.ts
@@ -158,3 +158,9 @@ it('should not crash on storage.getDirectory()', async ({ page, server, browserN
expect(error).toBeFalsy();
}
});
+
+it('navigator.clipboard should be present', async ({ page, server, browserName, browserMajorVersion }) => {
+ it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/18901' });
+ await page.goto(server.EMPTY_PAGE);
+ expect(await page.evaluate(() => navigator.clipboard)).toBeTruthy();
+});