@luucamay_
Open Source framework
for reliable end to end testingΒ cross browser (Firefox, Chrome, Edge, Safari, mobile browsers)
for modern web apps
import { test, expect } from '@playwright/test';
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
const title = page.locator('.navbar__inner .navbar__title');
await expect(title).toHaveText('Playwright');
});
npx playwright codegen
Write a test with Codegen and Playwright for your favorite website.
Take an image or video of your test and tag me on Twitter or Linkedin @luucamay_ #ReactEnTiemposDeChatGPT
npx playwright test
import { test, expect } from '@playwright/test';
test('test with screenshot', async ({ page }) => {
await page.goto('https://msn.com/en-gb');
const element = page.locator('#onetrust-banner-sdk');
await page.screenshot({
path: `screenshot.png`,
})
await expect(element).toBeVisible();
});