API利用法
PlaywrightのAPI利用法を以下に示します。
基本的なテスト
Section titled “基本的なテスト”Playwrightを使用して基本的なテストを作成します。
const { test, expect } = require('@playwright/test');
test('basic test', async ({ page }) => { await page.goto('https://example.com'); const title = await page.title(); expect(title).toBe('Example Domain');});