microsoft/playwright-test

TypeError: Cannot read property 'launch' of undefined

av-sk opened this issue · 2 comments

av-sk commented

When I run even the simplest of tests. ::

This is the sample from the documentation.
//foo.spec.ts
import { it, expect } from "@playwright/test";

it("is a basic test with the page", async ({ page }) => {
await page.goto("https://playwright.dev/");
const name = await page.innerText(".navbar__title");
expect(name).toBe("Playwright");
});

I get the following error:

  1. foo.spec.ts:3:1 › is a basic test with the page ===============================================
    browserName=chromium,, headful=false, slowMo=0, video=false, screenshotOnFailure=true
TypeError: Cannot read property 'launch' of undefined

    at Object.fixtures.browser.init.scope [as fn] (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\@playwright\test\out\index.js:48:39)
    at Fixture.setup (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:78:52)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at FixturePool.setupFixtureForRegistration (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:239:9)
    at Fixture.setup (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:68:25)
    at FixturePool.setupFixtureForRegistration (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:239:9)
    at Fixture.setup (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:68:25)
    at FixturePool.setupFixtureForRegistration (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:239:9)
    at Fixture.setup (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:68:25)
    at FixturePool.setupFixtureForRegistration (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:239:9)
    at FixturePool.resolveParametersAndRunHookOrTest (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\fixtures.js:258:29)
    at WorkerRunner._runTestWithFixturesAndHooks (C:\repos\SkyKick.Migrations.MigrationServices\tools\prototypes\playwright-test\node_modules\folio\out\workerRunner.js:187:17)
av-sk commented

Running in powershell core causes this issue. Running in Windows Powershell I don't see this issue occur.

The new test-runner which got released yesterday is quite different. So I'm closing this as part of the triage. Please reopen if its still persistent.