مایکروسافت ابزار جدیدی را برای تستنویسی برنامههای وب به نام «Playwright» ارائه کرده است. با استفاده از این ابزار امکان انجام تست بر روی Chromium ، Firefox و WebKit با استفاده از یک API وجود دارد.
یک مثال ساده:
import { test, expect } from "@playwright/test"; test.describe("navigation", () => { test.beforeEach(async ({ page }) => { // Go to the starting url before each test. await page.goto("https://playwright.dev/"); }); test("main navigation", async ({ page }) => { // Assertions use the expect API. await expect(page).toHaveURL("https://playwright.dev/"); }); });