Skip to content

API利用法

PlaywrightのAPI利用法を以下に示します。

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');
});