-1

i am trying to run playwright in bun. but when i run bun run test.ts, the output hangs at Launching Chromium....

output:

PS D:\\Javascript files\\ss_url_project_copy\\backend\> bun run test.ts

Launching Chromium...
import { chromium } from "playwright";

(async () => {
  try {
    console.log("Launching Chromium...");
    const browser = await chromium.launch({ headless: false });
    const page = await browser.newPage();
    await page.goto("https://www.google.com");
    console.log("Opened Google!");
    await browser.close();
  } catch (error) {
    console.error("Error:", error);
  }
})();

1 Answer 1

0

At first glance, I think the 'import' you're using is incorrect. You're importing from playwright; it should be playwright/test.

import { chromium, test } from '@playwright/test';

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.