1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 13:58:08 +00:00
_/playwright/inner-text.test.ts
2024-10-24 21:31:42 +09:00

21 lines
697 B
TypeScript

import { expect, test } from "@playwright/test";
test("first", async ({ page }) => {
// @ts-ignore
await page.goto(`file:///${__dirname}/test.html`);
// playwright test --browser=chromium : pass
// playwright test --browser=firefox : pass
// playwright test --browser=webkit : fail (return `1\n`)
expect(await page.innerText("first-test")).toBe(`1`);
});
test("second", async ({ page }) => {
// @ts-ignore
await page.goto(`file:///${__dirname}/test.html`);
// playwright test --browser=chromium : pass
// playwright test --browser=firefox : pass
// playwright test --browser=webkit : fail (return `2\n`)
expect(await page.innerText("second-test")).toBe(`2`);
});