編集

Playwright v1.15.0

Playwright v1.15.0 がリリース。

https://github.com/microsoft/playwright/releases/tag/v1.50.0

#Step API の timeout オプション

Playwright v1.14 で導入された Step API に timeout オプションが追加された。 これによりステップ毎にタイムアウトを設定できるようになった。

js
test("some test", async ({ page }) => {
  await test.step(
    "a step",
    async () => {
      // This step can time out separately from the test
    },
    { timeout: 1000 }
  );
});

#Step API の skip メソッド

Step API に skip メソッドが追加された。

js
test("some test", async ({ page }) => {
  await test.step("before running step", async () => {
    // Normal step
  });

  await test.step.skip("not yet ready", async () => {
    // This step is skipped
  });

  await test.step("after running step", async () => {
    // This step still runs even though the previous one was skipped
  });
});
編集