diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index 26e2a465c84..56227115207 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -8,12 +8,13 @@ import type { Protocol } from 'playwright-core/types/protocol'; import { dirname, join } from 'path'; import { promises } from 'fs'; import { IWindowDriver } from './driver'; -import { PageFunction } from 'playwright-core/types/structs'; import { measureAndLog } from './logger'; import { LaunchOptions } from './code'; import { teardown } from './processes'; import { ChildProcess } from 'child_process'; +type PageFunction = (arg: Arg) => T | Promise; + export class PlaywrightDriver { private static traceCounter = 1; diff --git a/test/automation/tsconfig.json b/test/automation/tsconfig.json index 88472717b77..908cc3367a3 100644 --- a/test/automation/tsconfig.json +++ b/test/automation/tsconfig.json @@ -12,7 +12,12 @@ "lib": [ "esnext", // for #201187 "dom" - ] + ], + "paths": { + "playwright-core/types/protocol": [ + "../../node_modules/playwright-core/types/protocol.d.ts" + ] + } }, "exclude": [ "node_modules",