Skip to content

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

docs(intro-js): make js and ts example consistent (#7651)

Nav-2dac8ad1050ed5
diff --git a/docs/src/intro-js.md b/docs/src/intro-js.md
index 9cac8df33e..785e2a2735 100644
--- a/docs/src/intro-js.md
+++ b/docs/src/intro-js.md
@@ -267,6 +267,9 @@ test('my test', async ({ page }) => {
// Expect an attribute "to be strictly equal" to the value.
expect(await page.getAttribute('text=Get Started', 'href')).toBe('/docs/intro');
+ // Expect an element "to be visible".
+ expect(await page.isVisible('text=Learn more')).toBeTruthy();
+
await page.click('text=Get Started');
// Expect some text to be visible on the page.
expect(await page.waitForSelector('text=System requirements')).toBeTruthy();