0

現在、JavaScriptでPlaywrightライブラリを用いて、以下のコードでブラウザを起動してE2Eテストを実行しようとしております。

import { chromium } from "playwright";
const launchOptions = {
    "headless":false,
    "channel":"chrome",
    "args": [
        "--no-sandbox",
        "--no-zygote"]
};

chromium.launch(launchOptions).then(async browser => {
    const page = await browser.newPage();
    await page.goto("https://google.com");
    await browser.close();
})

これを実行してみた所、以下のエラーが発生しました。

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch: Browser closed.

サンプルコードを実行してみたのですが、何かしらWindowsで用いる場合追加で設定が必要かどうか、ご存知の方居ましたらご教示頂けないでしょうか?

1

0

この質問に回答するには、ログインする必要があります。

のタグが付いた他の質問を参照する。