@ricsam/isolate 0.1.8 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -18
- package/dist/cjs/bridge/diagnostics.cjs +37 -2
- package/dist/cjs/bridge/diagnostics.cjs.map +3 -3
- package/dist/cjs/bridge/runtime-bindings.cjs +203 -51
- package/dist/cjs/bridge/runtime-bindings.cjs.map +3 -3
- package/dist/cjs/bridge/sandbox-isolate.cjs +365 -0
- package/dist/cjs/bridge/sandbox-isolate.cjs.map +10 -0
- package/dist/cjs/host/create-isolate-host.cjs +51 -25
- package/dist/cjs/host/create-isolate-host.cjs.map +3 -3
- package/dist/cjs/host/nested-host-controller.cjs +311 -0
- package/dist/cjs/host/nested-host-controller.cjs.map +10 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/internal/browser-source.cjs +91 -0
- package/dist/cjs/internal/browser-source.cjs.map +10 -0
- package/dist/cjs/internal/client/connection.cjs +152 -172
- package/dist/cjs/internal/client/connection.cjs.map +3 -3
- package/dist/cjs/internal/daemon/callback-fs-handler.cjs +3 -3
- package/dist/cjs/internal/daemon/callback-fs-handler.cjs.map +3 -3
- package/dist/cjs/internal/daemon/connection.cjs +129 -4
- package/dist/cjs/internal/daemon/connection.cjs.map +3 -3
- package/dist/cjs/internal/encoding/index.cjs +27 -4
- package/dist/cjs/internal/encoding/index.cjs.map +3 -3
- package/dist/cjs/internal/fetch/index.cjs +2 -7
- package/dist/cjs/internal/fetch/index.cjs.map +3 -3
- package/dist/cjs/internal/module-loader/bundle.cjs +128 -1
- package/dist/cjs/internal/module-loader/bundle.cjs.map +3 -3
- package/dist/cjs/internal/playwright/client.cjs +4 -2
- package/dist/cjs/internal/playwright/client.cjs.map +3 -3
- package/dist/cjs/internal/playwright/handler.cjs +298 -25
- package/dist/cjs/internal/playwright/handler.cjs.map +3 -3
- package/dist/cjs/internal/playwright/index.cjs +54 -8
- package/dist/cjs/internal/playwright/index.cjs.map +3 -3
- package/dist/cjs/internal/playwright/types.cjs +3 -1
- package/dist/cjs/internal/playwright/types.cjs.map +3 -3
- package/dist/cjs/internal/protocol/codec.cjs +16 -5
- package/dist/cjs/internal/protocol/codec.cjs.map +3 -3
- package/dist/cjs/internal/protocol/marshalValue.cjs +37 -6
- package/dist/cjs/internal/protocol/marshalValue.cjs.map +3 -3
- package/dist/cjs/internal/protocol/types.cjs.map +2 -2
- package/dist/cjs/internal/runtime/index.cjs +377 -22
- package/dist/cjs/internal/runtime/index.cjs.map +3 -3
- package/dist/cjs/internal/typecheck/index.cjs +2 -1
- package/dist/cjs/internal/typecheck/index.cjs.map +3 -3
- package/dist/cjs/internal/typecheck/isolate-types.cjs +186 -13
- package/dist/cjs/internal/typecheck/isolate-types.cjs.map +3 -3
- package/dist/cjs/internal/typecheck/typecheck.cjs +2 -3
- package/dist/cjs/internal/typecheck/typecheck.cjs.map +3 -3
- package/dist/cjs/modules/index.cjs +6 -1
- package/dist/cjs/modules/index.cjs.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/runtime/script-runtime.cjs +14 -12
- package/dist/cjs/runtime/script-runtime.cjs.map +3 -3
- package/dist/cjs/runtime/test-runtime.cjs +113 -0
- package/dist/cjs/runtime/test-runtime.cjs.map +10 -0
- package/dist/cjs/server/app-server.cjs +16 -9
- package/dist/cjs/server/app-server.cjs.map +3 -3
- package/dist/cjs/typecheck/index.cjs +2 -1
- package/dist/cjs/typecheck/index.cjs.map +3 -3
- package/dist/mjs/bridge/diagnostics.mjs +37 -2
- package/dist/mjs/bridge/diagnostics.mjs.map +3 -3
- package/dist/mjs/bridge/runtime-bindings.mjs +206 -51
- package/dist/mjs/bridge/runtime-bindings.mjs.map +3 -3
- package/dist/mjs/bridge/sandbox-isolate.mjs +325 -0
- package/dist/mjs/bridge/sandbox-isolate.mjs.map +10 -0
- package/dist/mjs/host/create-isolate-host.mjs +53 -25
- package/dist/mjs/host/create-isolate-host.mjs.map +3 -3
- package/dist/mjs/host/nested-host-controller.mjs +275 -0
- package/dist/mjs/host/nested-host-controller.mjs.map +10 -0
- package/dist/mjs/index.mjs.map +1 -1
- package/dist/mjs/internal/browser-source.mjs +51 -0
- package/dist/mjs/internal/browser-source.mjs.map +10 -0
- package/dist/mjs/internal/client/connection.mjs +154 -173
- package/dist/mjs/internal/client/connection.mjs.map +3 -3
- package/dist/mjs/internal/daemon/callback-fs-handler.mjs +3 -3
- package/dist/mjs/internal/daemon/callback-fs-handler.mjs.map +3 -3
- package/dist/mjs/internal/daemon/connection.mjs +129 -4
- package/dist/mjs/internal/daemon/connection.mjs.map +3 -3
- package/dist/mjs/internal/encoding/index.mjs +27 -4
- package/dist/mjs/internal/encoding/index.mjs.map +3 -3
- package/dist/mjs/internal/fetch/index.mjs +2 -7
- package/dist/mjs/internal/fetch/index.mjs.map +3 -3
- package/dist/mjs/internal/module-loader/bundle.mjs +129 -2
- package/dist/mjs/internal/module-loader/bundle.mjs.map +3 -3
- package/dist/mjs/internal/playwright/client.mjs +7 -3
- package/dist/mjs/internal/playwright/client.mjs.map +3 -3
- package/dist/mjs/internal/playwright/handler.mjs +300 -26
- package/dist/mjs/internal/playwright/handler.mjs.map +3 -3
- package/dist/mjs/internal/playwright/index.mjs +59 -9
- package/dist/mjs/internal/playwright/index.mjs.map +3 -3
- package/dist/mjs/internal/playwright/types.mjs +3 -1
- package/dist/mjs/internal/playwright/types.mjs.map +3 -3
- package/dist/mjs/internal/protocol/codec.mjs +16 -5
- package/dist/mjs/internal/protocol/codec.mjs.map +3 -3
- package/dist/mjs/internal/protocol/marshalValue.mjs +38 -6
- package/dist/mjs/internal/protocol/marshalValue.mjs.map +3 -3
- package/dist/mjs/internal/protocol/types.mjs.map +2 -2
- package/dist/mjs/internal/runtime/index.mjs +377 -22
- package/dist/mjs/internal/runtime/index.mjs.map +3 -3
- package/dist/mjs/internal/typecheck/index.mjs +3 -1
- package/dist/mjs/internal/typecheck/index.mjs.map +3 -3
- package/dist/mjs/internal/typecheck/isolate-types.mjs +186 -13
- package/dist/mjs/internal/typecheck/isolate-types.mjs.map +3 -3
- package/dist/mjs/internal/typecheck/typecheck.mjs +2 -3
- package/dist/mjs/internal/typecheck/typecheck.mjs.map +3 -3
- package/dist/mjs/modules/index.mjs +6 -1
- package/dist/mjs/modules/index.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/dist/mjs/runtime/script-runtime.mjs +16 -12
- package/dist/mjs/runtime/script-runtime.mjs.map +3 -3
- package/dist/mjs/runtime/test-runtime.mjs +78 -0
- package/dist/mjs/runtime/test-runtime.mjs.map +10 -0
- package/dist/mjs/server/app-server.mjs +23 -11
- package/dist/mjs/server/app-server.mjs.map +3 -3
- package/dist/mjs/typecheck/index.mjs +2 -1
- package/dist/mjs/typecheck/index.mjs.map +3 -3
- package/dist/types/bridge/diagnostics.d.ts +6 -1
- package/dist/types/bridge/runtime-bindings.d.ts +5 -1
- package/dist/types/bridge/sandbox-isolate.d.ts +15 -0
- package/dist/types/host/nested-host-controller.d.ts +11 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/browser-source.d.ts +11 -0
- package/dist/types/internal/client/types.d.ts +5 -0
- package/dist/types/internal/daemon/types.d.ts +0 -2
- package/dist/types/internal/playwright/client.d.ts +2 -2
- package/dist/types/internal/playwright/handler.d.ts +27 -4
- package/dist/types/internal/playwright/index.d.ts +2 -2
- package/dist/types/internal/playwright/types.d.ts +33 -1
- package/dist/types/internal/protocol/codec.d.ts +12 -2
- package/dist/types/internal/protocol/marshalValue.d.ts +3 -2
- package/dist/types/internal/protocol/types.d.ts +25 -1
- package/dist/types/internal/runtime/index.d.ts +5 -0
- package/dist/types/internal/typecheck/index.d.ts +1 -1
- package/dist/types/internal/typecheck/isolate-types.d.ts +6 -4
- package/dist/types/internal/typecheck/typecheck.d.ts +1 -1
- package/dist/types/runtime/script-runtime.d.ts +2 -1
- package/dist/types/runtime/test-runtime.d.ts +4 -0
- package/dist/types/server/app-server.d.ts +2 -1
- package/dist/types/types.d.ts +33 -33
- package/package.json +3 -3
- package/dist/cjs/browser/browser-runtime.cjs +0 -157
- package/dist/cjs/browser/browser-runtime.cjs.map +0 -10
- package/dist/mjs/browser/browser-runtime.mjs +0 -93
- package/dist/mjs/browser/browser-runtime.mjs.map +0 -10
- package/dist/types/browser/browser-runtime.d.ts +0 -3
|
@@ -64,6 +64,7 @@ var __export = (target, all) => {
|
|
|
64
64
|
var exports_playwright = {};
|
|
65
65
|
__export(exports_playwright, {
|
|
66
66
|
setupPlaywright: () => setupPlaywright,
|
|
67
|
+
getPlaywrightHandlerMetadata: () => import_handler.getPlaywrightHandlerMetadata,
|
|
67
68
|
getDefaultPlaywrightHandlerMetadata: () => import_handler.getDefaultPlaywrightHandlerMetadata,
|
|
68
69
|
defaultPlaywrightHandler: () => import_handler.defaultPlaywrightHandler,
|
|
69
70
|
createPlaywrightHandler: () => import_handler.createPlaywrightHandler,
|
|
@@ -72,6 +73,7 @@ __export(exports_playwright, {
|
|
|
72
73
|
module.exports = __toCommonJS(exports_playwright);
|
|
73
74
|
var import_isolated_vm = __toESM(require("@ricsam/isolated-vm"));
|
|
74
75
|
var import_types = require("./types.cjs");
|
|
76
|
+
var import_browser_source = require("../browser-source.cjs");
|
|
75
77
|
var import_handler = require("./handler.cjs");
|
|
76
78
|
var import_handler2 = require("./handler.cjs");
|
|
77
79
|
function wrapHandlerWithPredicateSupport(handler, evaluatePredicate, defaultTimeout) {
|
|
@@ -203,6 +205,7 @@ async function setupPlaywright(context, options) {
|
|
|
203
205
|
const handler = "handler" in options ? options.handler : undefined;
|
|
204
206
|
const handlerMetadata = handler ? import_handler2.getDefaultPlaywrightHandlerMetadata(handler) : undefined;
|
|
205
207
|
const page = explicitPage ?? handlerMetadata?.page;
|
|
208
|
+
const hasDefaultPage = options.hasDefaultPage ?? Boolean(page);
|
|
206
209
|
const createPage = "createPage" in options ? options.createPage : undefined;
|
|
207
210
|
const createContext = "createContext" in options ? options.createContext : undefined;
|
|
208
211
|
const readFile = "readFile" in options ? options.readFile : undefined;
|
|
@@ -223,6 +226,8 @@ async function setupPlaywright(context, options) {
|
|
|
223
226
|
let pageErrorHandler;
|
|
224
227
|
if (page) {
|
|
225
228
|
const onEvent = "onEvent" in options ? options.onEvent : undefined;
|
|
229
|
+
const contextId = "ctx_0";
|
|
230
|
+
const pageId = "page_0";
|
|
226
231
|
const requestIds = new WeakMap;
|
|
227
232
|
let nextRequestId = 1;
|
|
228
233
|
const getRequestId = (request) => {
|
|
@@ -245,6 +250,8 @@ async function setupPlaywright(context, options) {
|
|
|
245
250
|
};
|
|
246
251
|
requestHandler = (request) => {
|
|
247
252
|
const info = {
|
|
253
|
+
contextId,
|
|
254
|
+
pageId,
|
|
248
255
|
requestId: getRequestId(request),
|
|
249
256
|
url: request.url(),
|
|
250
257
|
method: request.method(),
|
|
@@ -257,6 +264,8 @@ async function setupPlaywright(context, options) {
|
|
|
257
264
|
if (onEvent) {
|
|
258
265
|
onEvent({
|
|
259
266
|
type: "networkRequest",
|
|
267
|
+
contextId: info.contextId,
|
|
268
|
+
pageId: info.pageId,
|
|
260
269
|
requestId: info.requestId,
|
|
261
270
|
url: info.url,
|
|
262
271
|
method: info.method,
|
|
@@ -270,6 +279,8 @@ async function setupPlaywright(context, options) {
|
|
|
270
279
|
responseHandler = (response) => {
|
|
271
280
|
const request = response.request();
|
|
272
281
|
const info = {
|
|
282
|
+
contextId,
|
|
283
|
+
pageId,
|
|
273
284
|
requestId: getRequestId(request),
|
|
274
285
|
url: response.url(),
|
|
275
286
|
status: response.status(),
|
|
@@ -282,6 +293,8 @@ async function setupPlaywright(context, options) {
|
|
|
282
293
|
if (onEvent) {
|
|
283
294
|
onEvent({
|
|
284
295
|
type: "networkResponse",
|
|
296
|
+
contextId: info.contextId,
|
|
297
|
+
pageId: info.pageId,
|
|
285
298
|
requestId: info.requestId,
|
|
286
299
|
url: info.url,
|
|
287
300
|
status: info.status,
|
|
@@ -294,6 +307,8 @@ async function setupPlaywright(context, options) {
|
|
|
294
307
|
};
|
|
295
308
|
requestFailedHandler = (request) => {
|
|
296
309
|
const info = {
|
|
310
|
+
contextId,
|
|
311
|
+
pageId,
|
|
297
312
|
requestId: getRequestId(request),
|
|
298
313
|
url: request.url(),
|
|
299
314
|
method: request.method(),
|
|
@@ -305,6 +320,8 @@ async function setupPlaywright(context, options) {
|
|
|
305
320
|
if (onEvent) {
|
|
306
321
|
onEvent({
|
|
307
322
|
type: "requestFailure",
|
|
323
|
+
contextId: info.contextId,
|
|
324
|
+
pageId: info.pageId,
|
|
308
325
|
requestId: info.requestId,
|
|
309
326
|
url: info.url,
|
|
310
327
|
method: info.method,
|
|
@@ -317,6 +334,8 @@ async function setupPlaywright(context, options) {
|
|
|
317
334
|
consoleHandler = (msg) => {
|
|
318
335
|
const args = msg.args().map((arg) => String(arg));
|
|
319
336
|
const entry = {
|
|
337
|
+
contextId,
|
|
338
|
+
pageId,
|
|
320
339
|
level: msg.type(),
|
|
321
340
|
stdout: args.join(" "),
|
|
322
341
|
location: toLocation(msg.location()),
|
|
@@ -326,6 +345,8 @@ async function setupPlaywright(context, options) {
|
|
|
326
345
|
if (onEvent) {
|
|
327
346
|
onEvent({
|
|
328
347
|
type: "browserConsoleLog",
|
|
348
|
+
contextId: entry.contextId,
|
|
349
|
+
pageId: entry.pageId,
|
|
329
350
|
level: entry.level,
|
|
330
351
|
stdout: entry.stdout,
|
|
331
352
|
location: entry.location,
|
|
@@ -339,6 +360,8 @@ async function setupPlaywright(context, options) {
|
|
|
339
360
|
};
|
|
340
361
|
pageErrorHandler = (error) => {
|
|
341
362
|
const entry = {
|
|
363
|
+
contextId,
|
|
364
|
+
pageId,
|
|
342
365
|
name: error.name,
|
|
343
366
|
message: error.message,
|
|
344
367
|
stack: error.stack,
|
|
@@ -348,6 +371,8 @@ async function setupPlaywright(context, options) {
|
|
|
348
371
|
if (onEvent) {
|
|
349
372
|
onEvent({
|
|
350
373
|
type: "pageError",
|
|
374
|
+
contextId: entry.contextId,
|
|
375
|
+
pageId: entry.pageId,
|
|
351
376
|
name: entry.name,
|
|
352
377
|
message: entry.message,
|
|
353
378
|
stack: entry.stack,
|
|
@@ -634,7 +659,7 @@ async function setupPlaywright(context, options) {
|
|
|
634
659
|
async isChecked(selector) { return this.locator(selector).isChecked(); }
|
|
635
660
|
async isHidden(selector) { return this.locator(selector).isHidden(); }
|
|
636
661
|
async isDisabled(selector) { return this.locator(selector).isDisabled(); }
|
|
637
|
-
async screenshot(options) {
|
|
662
|
+
async screenshot(options) { await __pw_invoke("screenshot", [options || {}], { pageId: this.#pageId }); }
|
|
638
663
|
async setViewportSize(size) { return __pw_invoke("setViewportSize", [size], { pageId: this.#pageId }); }
|
|
639
664
|
async viewportSize() { return __pw_invoke("viewportSize", [], { pageId: this.#pageId }); }
|
|
640
665
|
async emulateMedia(options) { return __pw_invoke("emulateMedia", [options], { pageId: this.#pageId }); }
|
|
@@ -703,6 +728,10 @@ async function setupPlaywright(context, options) {
|
|
|
703
728
|
async clearCookies() { return __pw_invoke("clearCookies", [], { contextId: this.#contextId }); }
|
|
704
729
|
async addCookies(cookies) { return __pw_invoke("addCookies", [cookies], { contextId: this.#contextId }); }
|
|
705
730
|
async cookies(urls) { return __pw_invoke("cookies", [urls], { contextId: this.#contextId }); }
|
|
731
|
+
async pages() {
|
|
732
|
+
const pageIds = await __pw_invoke("pages", [], { contextId: this.#contextId });
|
|
733
|
+
return pageIds.map((pageId) => new IsolatePage(pageId, this.#contextId));
|
|
734
|
+
}
|
|
706
735
|
}
|
|
707
736
|
globalThis.IsolateContext = IsolateContext;
|
|
708
737
|
|
|
@@ -711,14 +740,29 @@ async function setupPlaywright(context, options) {
|
|
|
711
740
|
async newContext(options) {
|
|
712
741
|
const result = await __pw_invoke("newContext", [options || null]);
|
|
713
742
|
return new IsolateContext(result.contextId);
|
|
743
|
+
},
|
|
744
|
+
async contexts() {
|
|
745
|
+
const contextIds = await __pw_invoke("contexts", []);
|
|
746
|
+
return contextIds.map((contextId) => new IsolateContext(contextId));
|
|
714
747
|
}
|
|
715
748
|
};
|
|
749
|
+
Object.defineProperty(globalThis.browser, ${JSON.stringify(import_browser_source.ISOLATE_BROWSER_DESCRIPTOR_PROPERTY)}, {
|
|
750
|
+
value: ${JSON.stringify(import_browser_source.ISOLATE_BROWSER_DESCRIPTOR_VALUE)},
|
|
751
|
+
enumerable: false,
|
|
752
|
+
configurable: false,
|
|
753
|
+
writable: false,
|
|
754
|
+
});
|
|
716
755
|
|
|
717
|
-
|
|
718
|
-
|
|
756
|
+
if (${JSON.stringify(hasDefaultPage)}) {
|
|
757
|
+
// context global - represents the default context
|
|
758
|
+
globalThis.context = new IsolateContext("ctx_0");
|
|
719
759
|
|
|
720
|
-
|
|
721
|
-
|
|
760
|
+
// page global - represents the default page
|
|
761
|
+
globalThis.page = new IsolatePage("page_0", "ctx_0");
|
|
762
|
+
} else {
|
|
763
|
+
delete globalThis.context;
|
|
764
|
+
delete globalThis.page;
|
|
765
|
+
}
|
|
722
766
|
})();
|
|
723
767
|
`);
|
|
724
768
|
context.evalSync(`
|
|
@@ -915,8 +959,7 @@ async function setupPlaywright(context, options) {
|
|
|
915
959
|
return __pw_invoke("locatorAction", [...this._getInfo(), "setInputFiles", serializedFiles], { pageId: this.#pageId });
|
|
916
960
|
}
|
|
917
961
|
async screenshot(options) {
|
|
918
|
-
|
|
919
|
-
return base64;
|
|
962
|
+
await __pw_invoke("locatorAction", [...this._getInfo(), "screenshot", options || {}], { pageId: this.#pageId });
|
|
920
963
|
}
|
|
921
964
|
async dragTo(target) {
|
|
922
965
|
const targetInfo = target._getInfo();
|
|
@@ -1276,6 +1319,9 @@ async function setupPlaywright(context, options) {
|
|
|
1276
1319
|
getRequestFailures() {
|
|
1277
1320
|
return [...requestFailures];
|
|
1278
1321
|
},
|
|
1322
|
+
getTrackedResources() {
|
|
1323
|
+
return page ? { contexts: ["ctx_0"], pages: ["page_0"] } : { contexts: [], pages: [] };
|
|
1324
|
+
},
|
|
1279
1325
|
clearCollected() {
|
|
1280
1326
|
browserConsoleLogs.length = 0;
|
|
1281
1327
|
pageErrors.length = 0;
|
|
@@ -1286,4 +1332,4 @@ async function setupPlaywright(context, options) {
|
|
|
1286
1332
|
};
|
|
1287
1333
|
}
|
|
1288
1334
|
|
|
1289
|
-
//# debugId=
|
|
1335
|
+
//# debugId=AAE1E1D85D1B913F64756E2164756E21
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/internal/playwright/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import ivm from \"@ricsam/isolated-vm\";\nimport type {\n PlaywrightOperation,\n} from \"../protocol/index.cjs\";\nimport {\n DEFAULT_PLAYWRIGHT_HANDLER_META,\n} from \"./types.cjs\";\n\n// Re-export handler functions from handler.ts\nexport {\n createPlaywrightHandler,\n defaultPlaywrightHandler,\n getDefaultPlaywrightHandlerMetadata,\n} from \"./handler.cjs\";\n\n// Re-export protocol types\nexport type { PlaywrightOperation, PlaywrightResult, PlaywrightEvent, PlaywrightFileData } from \"../protocol/index.cjs\";\nexport { DEFAULT_PLAYWRIGHT_HANDLER_META };\n\n// Re-export types from types.ts\nexport type {\n NetworkRequestInfo,\n NetworkResponseInfo,\n BrowserConsoleLogEntry,\n PageErrorInfo,\n RequestFailureInfo,\n PlaywrightCallback,\n PlaywrightSetupOptions,\n PlaywrightHandle,\n} from \"./types.cjs\";\n\n// Import handler functions for use within this module\nimport {\n createPlaywrightHandler,\n getDefaultPlaywrightHandlerMetadata,\n} from \"./handler.cjs\";\nimport type {\n PlaywrightCallback,\n PlaywrightSetupOptions,\n PlaywrightHandle,\n NetworkRequestInfo,\n NetworkResponseInfo,\n BrowserConsoleLogEntry,\n PageErrorInfo,\n RequestFailureInfo,\n} from \"./types.cjs\";\n\n// ============================================================================\n// Predicate Support Wrapper for Remote Handlers\n// ============================================================================\n\n/**\n * Wraps a remote handler (no direct page access) to support predicate-based\n * waitFor* operations. Predicate ops are handled locally by issuing sub-operations\n * through the handler and evaluating the predicate in the isolate.\n */\nfunction wrapHandlerWithPredicateSupport(\n handler: PlaywrightCallback,\n evaluatePredicate: (predicateId: number, data: unknown) => boolean,\n defaultTimeout: number,\n): PlaywrightCallback {\n return async (op) => {\n switch (op.type) {\n case \"waitForURLPredicate\": {\n const [predicateId, customTimeout, waitUntil] = op.args as [number, number?, string?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const startTime = Date.now();\n const pollInterval = 100;\n\n while (true) {\n // Get current URL via the handler\n const urlResult = await handler({ type: \"url\", args: [], pageId: op.pageId, contextId: op.contextId });\n if (urlResult.ok) {\n try {\n if (evaluatePredicate(predicateId, urlResult.value as string)) {\n return { ok: true };\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n }\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for URL` } };\n }\n await new Promise(r => setTimeout(r, pollInterval));\n }\n }\n case \"waitForResponsePredicateFinish\": {\n const [initialListenerId, predicateId, customTimeout] = op.args as [string, number, number?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const broadMatcher = { type: 'regex' as const, value: { $regex: '.*', $flags: '' } };\n const startTime = Date.now();\n let currentListenerId = initialListenerId;\n\n while (true) {\n // Wait for response data from current listener\n const finishResult = await handler({\n type: \"waitForResponseFinish\",\n args: [currentListenerId],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!finishResult.ok) return finishResult;\n const responseData = finishResult.value as Record<string, unknown>;\n\n // Evaluate predicate\n try {\n const serialized = {\n method: '',\n headers: Object.entries((responseData.headers || {}) as Record<string, string>),\n url: responseData.url as string,\n status: responseData.status as number,\n statusText: responseData.statusText as string,\n body: (responseData.text as string) || '',\n };\n if (evaluatePredicate(predicateId, serialized)) {\n return finishResult;\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for response` } };\n }\n\n // Not matched — start next listener\n const remainingTimeout = effectiveTimeout > 0 ? Math.max(1, effectiveTimeout - (Date.now() - startTime)) : effectiveTimeout;\n const nextStartResult = await handler({\n type: \"waitForResponseStart\",\n args: [broadMatcher, remainingTimeout],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!nextStartResult.ok) return nextStartResult;\n currentListenerId = (nextStartResult.value as { listenerId: string }).listenerId;\n }\n }\n case \"waitForRequestPredicateFinish\": {\n const [initialListenerId, predicateId, customTimeout] = op.args as [string, number, number?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const broadMatcher = { type: 'regex' as const, value: { $regex: '.*', $flags: '' } };\n const startTime = Date.now();\n let currentListenerId = initialListenerId;\n\n while (true) {\n const finishResult = await handler({\n type: \"waitForRequestFinish\",\n args: [currentListenerId],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!finishResult.ok) return finishResult;\n const requestData = finishResult.value as Record<string, unknown>;\n\n try {\n const serialized = {\n method: requestData.method as string,\n headers: Object.entries((requestData.headers || {}) as Record<string, string>),\n url: requestData.url as string,\n body: (requestData.postData as string) || '',\n };\n if (evaluatePredicate(predicateId, serialized)) {\n return finishResult;\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for request` } };\n }\n\n // Not matched — start next listener\n const remainingTimeout = effectiveTimeout > 0 ? Math.max(1, effectiveTimeout - (Date.now() - startTime)) : effectiveTimeout;\n const nextStartResult = await handler({\n type: \"waitForRequestStart\",\n args: [broadMatcher, remainingTimeout],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!nextStartResult.ok) return nextStartResult;\n currentListenerId = (nextStartResult.value as { listenerId: string }).listenerId;\n }\n }\n default:\n return handler(op);\n }\n };\n}\n\n// ============================================================================\n// Setup Playwright\n// ============================================================================\n\n/**\n * Set up playwright in an isolate context.\n *\n * For local use: provide `page` option (direct page access)\n * For remote use: provide `handler` option (callback pattern)\n */\nexport async function setupPlaywright(\n context: ivm.Context,\n options: PlaywrightSetupOptions\n): Promise<PlaywrightHandle> {\n const timeout = options.timeout ?? 30000;\n\n // Determine if we have a page or handler.\n // Handlers created via defaultPlaywrightHandler() carry page metadata so\n // event capture/collected data keeps working in handler-first mode.\n const explicitPage = \"page\" in options ? options.page : undefined;\n const handler = \"handler\" in options ? options.handler : undefined;\n const handlerMetadata = handler\n ? getDefaultPlaywrightHandlerMetadata(handler)\n : undefined;\n const page = explicitPage ?? handlerMetadata?.page;\n\n // Get lifecycle callbacks\n const createPage = \"createPage\" in options ? options.createPage : undefined;\n const createContext = \"createContext\" in options ? options.createContext : undefined;\n const readFile = \"readFile\" in options ? options.readFile : undefined;\n const writeFile = \"writeFile\" in options ? options.writeFile : undefined;\n\n if (!handler && !page) {\n throw new Error(\"Either page or handler must be provided to setupPlaywright\");\n }\n\n // State for collected data (only used when page is provided directly)\n const browserConsoleLogs: BrowserConsoleLogEntry[] = [];\n const pageErrors: PageErrorInfo[] = [];\n const networkRequests: NetworkRequestInfo[] = [];\n const networkResponses: NetworkResponseInfo[] = [];\n const requestFailures: RequestFailureInfo[] = [];\n\n const global = context.global;\n\n // ========================================================================\n // Event Capture (only when page is provided directly)\n // ========================================================================\n\n let requestHandler: ((request: import(\"playwright\").Request) => void) | undefined;\n let responseHandler: ((response: import(\"playwright\").Response) => void) | undefined;\n let requestFailedHandler: ((request: import(\"playwright\").Request) => void) | undefined;\n let consoleHandler: ((msg: import(\"playwright\").ConsoleMessage) => void) | undefined;\n let pageErrorHandler: ((error: Error) => void) | undefined;\n\n if (page) {\n // Get onEvent callback if provided\n const onEvent = \"onEvent\" in options ? options.onEvent : undefined;\n const requestIds = new WeakMap<import(\"playwright\").Request, string>();\n let nextRequestId = 1;\n const getRequestId = (request: import(\"playwright\").Request): string => {\n let requestId = requestIds.get(request);\n if (!requestId) {\n requestId = `req_${nextRequestId++}`;\n requestIds.set(request, requestId);\n }\n return requestId;\n };\n const toLocation = (\n location: { url?: string; lineNumber?: number; columnNumber?: number } | undefined,\n ): BrowserConsoleLogEntry[\"location\"] => {\n if (!location || (!location.url && location.lineNumber == null && location.columnNumber == null)) {\n return undefined;\n }\n\n return {\n url: location.url || undefined,\n lineNumber: location.lineNumber != null ? location.lineNumber + 1 : undefined,\n columnNumber: location.columnNumber != null ? location.columnNumber + 1 : undefined,\n };\n };\n\n requestHandler = (request: import(\"playwright\").Request) => {\n const info: NetworkRequestInfo = {\n requestId: getRequestId(request),\n url: request.url(),\n method: request.method(),\n headers: request.headers(),\n postData: request.postData() ?? undefined,\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n networkRequests.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"networkRequest\",\n requestId: info.requestId,\n url: info.url,\n method: info.method,\n headers: info.headers,\n postData: info.postData,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n responseHandler = (response: import(\"playwright\").Response) => {\n const request = response.request();\n const info: NetworkResponseInfo = {\n requestId: getRequestId(request),\n url: response.url(),\n status: response.status(),\n statusText: response.statusText(),\n headers: response.headers(),\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n networkResponses.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"networkResponse\",\n requestId: info.requestId,\n url: info.url,\n status: info.status,\n statusText: info.statusText,\n headers: info.headers,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n requestFailedHandler = (request: import(\"playwright\").Request) => {\n const info: RequestFailureInfo = {\n requestId: getRequestId(request),\n url: request.url(),\n method: request.method(),\n failureText: request.failure()?.errorText || \"request failed\",\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n requestFailures.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"requestFailure\",\n requestId: info.requestId,\n url: info.url,\n method: info.method,\n failureText: info.failureText,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n consoleHandler = (msg: import(\"playwright\").ConsoleMessage) => {\n const args = msg.args().map((arg) => String(arg));\n const entry: BrowserConsoleLogEntry = {\n level: msg.type(),\n stdout: args.join(\" \"),\n location: toLocation(msg.location()),\n timestamp: Date.now(),\n };\n browserConsoleLogs.push(entry);\n\n if (onEvent) {\n onEvent({\n type: \"browserConsoleLog\",\n level: entry.level,\n stdout: entry.stdout,\n location: entry.location,\n timestamp: entry.timestamp,\n });\n }\n\n // Print to stdout if console option is true\n if (\"console\" in options && options.console) {\n const prefix = `[browser:${entry.level}]`;\n console.log(prefix, entry.stdout);\n }\n };\n\n pageErrorHandler = (error: Error) => {\n const entry: PageErrorInfo = {\n name: error.name,\n message: error.message,\n stack: error.stack,\n timestamp: Date.now(),\n };\n pageErrors.push(entry);\n\n if (onEvent) {\n onEvent({\n type: \"pageError\",\n name: entry.name,\n message: entry.message,\n stack: entry.stack,\n timestamp: entry.timestamp,\n });\n }\n };\n\n page.on(\"request\", requestHandler);\n page.on(\"response\", responseHandler);\n page.on(\"requestfailed\", requestFailedHandler);\n page.on(\"console\", consoleHandler);\n page.on(\"pageerror\", pageErrorHandler);\n }\n\n // ========================================================================\n // Injected JavaScript\n // ========================================================================\n\n // Helper function to invoke handler and handle errors\n context.evalSync(`\n(function() {\n globalThis.__pw_invoke = async function(type, args, options) {\n const op = JSON.stringify({ type, args, pageId: options?.pageId, contextId: options?.contextId });\n const resultJson = await __Playwright_handler_ref.apply(\n undefined,\n [op],\n { result: { promise: true, copy: true } }\n );\n const result = JSON.parse(resultJson);\n if (result.ok) {\n return result.value;\n }\n const error = new Error(result.error.message);\n error.name = result.error.name;\n throw error;\n };\n})();\n`);\n\n // Predicate registry for waitForURL/Request/Response with function predicates\n context.evalSync(`\n(function() {\n const __pw_predicates = new Map();\n let __pw_next_id = 0;\n globalThis.__pw_register_predicate = function(fn) {\n const id = __pw_next_id++;\n __pw_predicates.set(id, fn);\n return id;\n };\n globalThis.__pw_unregister_predicate = function(id) {\n __pw_predicates.delete(id);\n };\n globalThis.__pw_evaluate_predicate = function(id, data) {\n const fn = __pw_predicates.get(id);\n if (!fn) throw new Error('Predicate not found: ' + id);\n const result = fn(data);\n if (result && typeof result === 'object' && typeof result.then === 'function') {\n throw new Error('Async predicates are not supported. Use a synchronous predicate function.');\n }\n return !!result;\n };\n})();\n`);\n\n // Get reference to the predicate evaluation function for host-side use\n const evaluatePredicateRef = context.global.getSync(\n '__pw_evaluate_predicate', { reference: true }\n ) as ivm.Reference<(id: number, data: unknown) => boolean>;\n\n // ========================================================================\n // Create Handler and Unified Handler Reference\n // ========================================================================\n\n const evaluatePredicateFn = (predicateId: number, data: unknown): boolean => {\n return evaluatePredicateRef.applySync(\n undefined,\n [new ivm.ExternalCopy(predicateId).copyInto(), new ivm.ExternalCopy(data).copyInto()]\n ) as boolean;\n };\n\n // Create handler with evaluatePredicate support.\n // When a page is available (either directly or through handler metadata),\n // create a handler with evaluatePredicate for efficient event-based predicate evaluation.\n // When only a remote handler is available (no page), wrap it to intercept predicate\n // operations and implement them via polling/sub-operations.\n let effectiveHandler: PlaywrightCallback;\n if (handler && handlerMetadata?.page) {\n // Handler-first mode with page metadata — recreate with evaluatePredicate\n effectiveHandler = createPlaywrightHandler(handlerMetadata.page, {\n ...handlerMetadata.options,\n evaluatePredicate: evaluatePredicateFn,\n });\n } else if (handler) {\n // Remote handler without page — wrap to handle predicate ops locally\n effectiveHandler = wrapHandlerWithPredicateSupport(handler, evaluatePredicateFn, timeout);\n } else if (page) {\n effectiveHandler = createPlaywrightHandler(page, {\n timeout,\n readFile,\n writeFile,\n createPage,\n createContext,\n evaluatePredicate: evaluatePredicateFn,\n });\n } else {\n throw new Error(\"Either page or handler must be provided to setupPlaywright\");\n }\n\n // Single handler reference that receives operation objects\n global.setSync(\n \"__Playwright_handler_ref\",\n new ivm.Reference(async (opJson: string): Promise<string> => {\n const op = JSON.parse(opJson) as PlaywrightOperation;\n const result = await effectiveHandler(op);\n return JSON.stringify(result);\n })\n );\n\n // IsolatePage class and page/context/browser globals\n context.evalSync(`\n(function() {\n // IsolatePage class - represents a page with a specific pageId\n class IsolatePage {\n #pageId; #contextId;\n constructor(pageId, contextId) {\n this.#pageId = pageId;\n this.#contextId = contextId;\n }\n get __isPage() { return true; }\n get __pageId() { return this.#pageId; }\n get __contextId() { return this.#contextId; }\n\n async goto(url, options) {\n await __pw_invoke(\"goto\", [url, options?.waitUntil || null], { pageId: this.#pageId });\n }\n async reload() {\n await __pw_invoke(\"reload\", [], { pageId: this.#pageId });\n }\n async url() { return __pw_invoke(\"url\", [], { pageId: this.#pageId }); }\n async title() { return __pw_invoke(\"title\", [], { pageId: this.#pageId }); }\n async content() { return __pw_invoke(\"content\", [], { pageId: this.#pageId }); }\n async waitForSelector(selector, options) {\n return __pw_invoke(\"waitForSelector\", [selector, options ? JSON.stringify(options) : null], { pageId: this.#pageId });\n }\n async waitForTimeout(ms) { return __pw_invoke(\"waitForTimeout\", [ms], { pageId: this.#pageId }); }\n async waitForLoadState(state) { return __pw_invoke(\"waitForLoadState\", [state || null], { pageId: this.#pageId }); }\n async evaluate(script, arg) {\n const hasArg = arguments.length > 1;\n if (hasArg) {\n const serialized = typeof script === \"function\" ? script.toString() : script;\n return __pw_invoke(\"evaluate\", [serialized, arg], { pageId: this.#pageId });\n }\n const serialized = typeof script === \"function\" ? \"(\" + script.toString() + \")()\" : script;\n return __pw_invoke(\"evaluate\", [serialized], { pageId: this.#pageId });\n }\n locator(selector) { return new Locator(\"css\", selector, null, this.#pageId); }\n getByRole(role, options) {\n if (options) {\n const serialized = { ...options };\n const name = options.name;\n if (name && typeof name === 'object' && typeof name.source === 'string' && typeof name.flags === 'string') {\n serialized.name = { $regex: name.source, $flags: name.flags };\n }\n return new Locator(\"role\", role, JSON.stringify(serialized), this.#pageId);\n }\n return new Locator(\"role\", role, null, this.#pageId);\n }\n getByText(text) { return new Locator(\"text\", text, null, this.#pageId); }\n getByLabel(label) { return new Locator(\"label\", label, null, this.#pageId); }\n getByPlaceholder(p) { return new Locator(\"placeholder\", p, null, this.#pageId); }\n getByTestId(id) { return new Locator(\"testId\", id, null, this.#pageId); }\n getByAltText(alt) { return new Locator(\"altText\", alt, null, this.#pageId); }\n getByTitle(title) { return new Locator(\"title\", title, null, this.#pageId); }\n frameLocator(selector) {\n const pageId = this.#pageId;\n return {\n locator(innerSelector) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"css\", innerSelector, null]]), null, pageId); },\n getByRole(role, options) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"role\", role, options ? JSON.stringify(options) : null]]), null, pageId); },\n getByText(text) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"text\", text, null]]), null, pageId); },\n getByLabel(label) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"label\", label, null]]), null, pageId); },\n getByPlaceholder(placeholder) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"placeholder\", placeholder, null]]), null, pageId); },\n getByTestId(testId) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"testId\", testId, null]]), null, pageId); },\n getByAltText(alt) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"altText\", alt, null]]), null, pageId); },\n getByTitle(title) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"title\", title, null]]), null, pageId); },\n };\n }\n async goBack(options) {\n await __pw_invoke(\"goBack\", [options?.waitUntil || null], { pageId: this.#pageId });\n }\n async goForward(options) {\n await __pw_invoke(\"goForward\", [options?.waitUntil || null], { pageId: this.#pageId });\n }\n async waitForURL(url, options) {\n if (typeof url === 'function') {\n const predicateId = __pw_register_predicate(url);\n try {\n await __pw_invoke(\"waitForURLPredicate\", [predicateId, options?.timeout || null, options?.waitUntil || null], { pageId: this.#pageId });\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n return;\n }\n let serializedUrl;\n if (typeof url === 'string') {\n serializedUrl = { type: 'string', value: url };\n } else if (url && typeof url === 'object' && typeof url.source === 'string' && typeof url.flags === 'string') {\n serializedUrl = { type: 'regex', value: { $regex: url.source, $flags: url.flags } };\n } else {\n serializedUrl = url;\n }\n return __pw_invoke(\"waitForURL\", [serializedUrl, options?.timeout || null, options?.waitUntil || null], { pageId: this.#pageId });\n }\n async waitForRequest(urlOrPredicate, options) {\n if (typeof urlOrPredicate === 'function') {\n const userPredicate = urlOrPredicate;\n const wrappedPredicate = (data) => {\n const requestLike = {\n url: () => data.url,\n method: () => data.method,\n headers: () => Object.fromEntries(data.headers),\n headersArray: () => data.headers.map(h => ({ name: h[0], value: h[1] })),\n postData: () => data.body || null,\n };\n return userPredicate(requestLike);\n };\n const predicateId = __pw_register_predicate(wrappedPredicate);\n const pageId = this.#pageId;\n // Start listening immediately (before the user triggers the request)\n const broadMatcher = { type: 'regex', value: { $regex: '.*', $flags: '' } };\n const startResult = await __pw_invoke(\"waitForRequestStart\", [broadMatcher, options?.timeout || null], { pageId });\n const listenerId = startResult.listenerId;\n try {\n const r = await __pw_invoke(\"waitForRequestPredicateFinish\", [listenerId, predicateId, options?.timeout || null], { pageId });\n return { url: () => r.url, method: () => r.method, headers: () => r.headers, postData: () => r.postData };\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n }\n let serializedMatcher;\n if (typeof urlOrPredicate === 'string') {\n serializedMatcher = { type: 'string', value: urlOrPredicate };\n } else if (urlOrPredicate && typeof urlOrPredicate === 'object'\n && typeof urlOrPredicate.source === 'string'\n && typeof urlOrPredicate.flags === 'string') {\n serializedMatcher = { type: 'regex', value: { $regex: urlOrPredicate.source, $flags: urlOrPredicate.flags } };\n } else {\n throw new Error('waitForRequest requires a URL string, RegExp, or predicate function');\n }\n const startResult = await __pw_invoke(\"waitForRequestStart\", [serializedMatcher, options?.timeout || null], { pageId: this.#pageId });\n const listenerId = startResult.listenerId;\n const pageId = this.#pageId;\n const r = await __pw_invoke(\"waitForRequestFinish\", [listenerId], { pageId });\n return { url: () => r.url, method: () => r.method, headers: () => r.headers, postData: () => r.postData };\n }\n async waitForResponse(urlOrPredicate, options) {\n if (typeof urlOrPredicate === 'function') {\n const userPredicate = urlOrPredicate;\n const wrappedPredicate = (data) => {\n const responseLike = {\n url: () => data.url,\n status: () => data.status,\n statusText: () => data.statusText,\n headers: () => Object.fromEntries(data.headers),\n headersArray: () => data.headers.map(h => ({ name: h[0], value: h[1] })),\n ok: () => data.status >= 200 && data.status < 300,\n };\n return userPredicate(responseLike);\n };\n const predicateId = __pw_register_predicate(wrappedPredicate);\n const pageId = this.#pageId;\n // Start listening immediately (before the user triggers the response)\n const broadMatcher = { type: 'regex', value: { $regex: '.*', $flags: '' } };\n const startResult = await __pw_invoke(\"waitForResponseStart\", [broadMatcher, options?.timeout || null], { pageId });\n const listenerId = startResult.listenerId;\n try {\n const r = await __pw_invoke(\"waitForResponsePredicateFinish\", [listenerId, predicateId, options?.timeout || null], { pageId });\n return {\n url: () => r.url, status: () => r.status, statusText: () => r.statusText,\n headers: () => r.headers, headersArray: () => r.headersArray,\n ok: () => r.ok, json: async () => r.json, text: async () => r.text, body: async () => r.body,\n };\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n }\n let serializedMatcher;\n if (typeof urlOrPredicate === 'string') {\n serializedMatcher = { type: 'string', value: urlOrPredicate };\n } else if (urlOrPredicate && typeof urlOrPredicate === 'object'\n && typeof urlOrPredicate.source === 'string'\n && typeof urlOrPredicate.flags === 'string') {\n serializedMatcher = { type: 'regex', value: { $regex: urlOrPredicate.source, $flags: urlOrPredicate.flags } };\n } else {\n throw new Error('waitForResponse requires a URL string, RegExp, or predicate function');\n }\n const startResult = await __pw_invoke(\"waitForResponseStart\", [serializedMatcher, options?.timeout || null], { pageId: this.#pageId });\n const listenerId = startResult.listenerId;\n const pageId = this.#pageId;\n const r = await __pw_invoke(\"waitForResponseFinish\", [listenerId], { pageId });\n return {\n url: () => r.url, status: () => r.status, statusText: () => r.statusText,\n headers: () => r.headers, headersArray: () => r.headersArray,\n ok: () => r.ok, json: async () => r.json, text: async () => r.text, body: async () => r.body,\n };\n }\n context() {\n const contextId = this.#contextId;\n return new IsolateContext(contextId);\n }\n async click(selector) { return this.locator(selector).click(); }\n async fill(selector, value) { return this.locator(selector).fill(value); }\n async textContent(selector) { return this.locator(selector).textContent(); }\n async innerText(selector) { return this.locator(selector).innerText(); }\n async innerHTML(selector) { return this.locator(selector).innerHTML(); }\n async getAttribute(selector, name) { return this.locator(selector).getAttribute(name); }\n async inputValue(selector) { return this.locator(selector).inputValue(); }\n async isVisible(selector) { return this.locator(selector).isVisible(); }\n async isEnabled(selector) { return this.locator(selector).isEnabled(); }\n async isChecked(selector) { return this.locator(selector).isChecked(); }\n async isHidden(selector) { return this.locator(selector).isHidden(); }\n async isDisabled(selector) { return this.locator(selector).isDisabled(); }\n async screenshot(options) { return __pw_invoke(\"screenshot\", [options || {}], { pageId: this.#pageId }); }\n async setViewportSize(size) { return __pw_invoke(\"setViewportSize\", [size], { pageId: this.#pageId }); }\n async viewportSize() { return __pw_invoke(\"viewportSize\", [], { pageId: this.#pageId }); }\n async emulateMedia(options) { return __pw_invoke(\"emulateMedia\", [options], { pageId: this.#pageId }); }\n async setExtraHTTPHeaders(headers) { return __pw_invoke(\"setExtraHTTPHeaders\", [headers], { pageId: this.#pageId }); }\n async bringToFront() { return __pw_invoke(\"bringToFront\", [], { pageId: this.#pageId }); }\n async close() { return __pw_invoke(\"close\", [], { pageId: this.#pageId }); }\n async isClosed() { return __pw_invoke(\"isClosed\", [], { pageId: this.#pageId }); }\n async pdf(options) { return __pw_invoke(\"pdf\", [options || {}], { pageId: this.#pageId }); }\n async pause() { return __pw_invoke(\"pause\", [], { pageId: this.#pageId }); }\n async frames() { return __pw_invoke(\"frames\", [], { pageId: this.#pageId }); }\n async mainFrame() { return __pw_invoke(\"mainFrame\", [], { pageId: this.#pageId }); }\n get keyboard() {\n const pageId = this.#pageId;\n return {\n async type(text, options) { return __pw_invoke(\"keyboardType\", [text, options], { pageId }); },\n async press(key, options) { return __pw_invoke(\"keyboardPress\", [key, options], { pageId }); },\n async down(key) { return __pw_invoke(\"keyboardDown\", [key], { pageId }); },\n async up(key) { return __pw_invoke(\"keyboardUp\", [key], { pageId }); },\n async insertText(text) { return __pw_invoke(\"keyboardInsertText\", [text], { pageId }); }\n };\n }\n get mouse() {\n const pageId = this.#pageId;\n return {\n async move(x, y, options) { return __pw_invoke(\"mouseMove\", [x, y, options], { pageId }); },\n async click(x, y, options) { return __pw_invoke(\"mouseClick\", [x, y, options], { pageId }); },\n async down(options) { return __pw_invoke(\"mouseDown\", [options], { pageId }); },\n async up(options) { return __pw_invoke(\"mouseUp\", [options], { pageId }); },\n async wheel(deltaX, deltaY) { return __pw_invoke(\"mouseWheel\", [deltaX, deltaY], { pageId }); }\n };\n }\n get request() {\n const pageId = this.#pageId;\n return {\n async fetch(url, options) {\n const result = await __pw_invoke(\"request\", [url, options?.method || \"GET\", options?.data, options?.headers], { pageId });\n return {\n status: () => result.status,\n ok: () => result.ok,\n headers: () => result.headers,\n json: async () => result.json,\n text: async () => result.text,\n body: async () => result.body,\n };\n },\n async get(url, options) { return this.fetch(url, { ...options, method: \"GET\" }); },\n async post(url, options) { return this.fetch(url, { ...options, method: \"POST\" }); },\n async put(url, options) { return this.fetch(url, { ...options, method: \"PUT\" }); },\n async delete(url, options) { return this.fetch(url, { ...options, method: \"DELETE\" }); },\n };\n }\n }\n globalThis.IsolatePage = IsolatePage;\n\n // IsolateContext class - represents a browser context with a specific contextId\n class IsolateContext {\n #contextId;\n constructor(contextId) { this.#contextId = contextId; }\n get __contextId() { return this.#contextId; }\n\n async newPage() {\n const result = await __pw_invoke(\"newPage\", [], { contextId: this.#contextId });\n return new IsolatePage(result.pageId, this.#contextId);\n }\n async close() { return __pw_invoke(\"closeContext\", [], { contextId: this.#contextId }); }\n async clearCookies() { return __pw_invoke(\"clearCookies\", [], { contextId: this.#contextId }); }\n async addCookies(cookies) { return __pw_invoke(\"addCookies\", [cookies], { contextId: this.#contextId }); }\n async cookies(urls) { return __pw_invoke(\"cookies\", [urls], { contextId: this.#contextId }); }\n }\n globalThis.IsolateContext = IsolateContext;\n\n // browser global - for creating new contexts\n globalThis.browser = {\n async newContext(options) {\n const result = await __pw_invoke(\"newContext\", [options || null]);\n return new IsolateContext(result.contextId);\n }\n };\n\n // context global - represents the default context\n globalThis.context = new IsolateContext(\"ctx_0\");\n\n // page global - represents the default page\n globalThis.page = new IsolatePage(\"page_0\", \"ctx_0\");\n})();\n`);\n\n // Locator class with pageId support\n context.evalSync(`\n(function() {\n // Helper to serialize options including RegExp\n function serializeOptions(options) {\n if (!options) return null;\n const serialized = { ...options };\n if (options.name && typeof options.name === 'object' && typeof options.name.source === 'string' && typeof options.name.flags === 'string') {\n serialized.name = { $regex: options.name.source, $flags: options.name.flags };\n }\n return JSON.stringify(serialized);\n }\n\n const INPUT_FILES_VALIDATION_ERROR =\n \"setInputFiles() expects a file path string, an array of file path strings, \" +\n \"a single inline file object ({ name, mimeType, buffer }), or an array of inline file objects.\";\n\n function isInlineFileObject(value) {\n return !!value\n && typeof value === 'object'\n && typeof value.name === 'string'\n && typeof value.mimeType === 'string'\n && 'buffer' in value;\n }\n\n function encodeInlineFileBuffer(buffer) {\n if (typeof buffer === 'string') {\n return buffer;\n }\n let bytes;\n if (buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(buffer);\n } else if (ArrayBuffer.isView(buffer)) {\n bytes = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n } else {\n throw new Error(\n \"setInputFiles() inline file buffer must be a base64 string, ArrayBuffer, or TypedArray.\"\n );\n }\n let binary = '';\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n }\n\n function serializeInlineFile(file) {\n return {\n name: file.name,\n mimeType: file.mimeType,\n buffer: encodeInlineFileBuffer(file.buffer),\n };\n }\n\n function normalizeSetInputFilesArg(files) {\n if (typeof files === 'string') {\n return files;\n }\n if (isInlineFileObject(files)) {\n return serializeInlineFile(files);\n }\n if (!Array.isArray(files)) {\n throw new Error(INPUT_FILES_VALIDATION_ERROR);\n }\n if (files.length === 0) {\n return [];\n }\n\n let hasPaths = false;\n let hasInline = false;\n const inlineFiles = [];\n\n for (const file of files) {\n if (typeof file === 'string') {\n hasPaths = true;\n continue;\n }\n if (isInlineFileObject(file)) {\n hasInline = true;\n inlineFiles.push(serializeInlineFile(file));\n continue;\n }\n throw new Error(INPUT_FILES_VALIDATION_ERROR);\n }\n\n if (hasPaths && hasInline) {\n throw new Error(\n \"setInputFiles() does not support mixing file paths and inline file objects in the same array.\"\n );\n }\n return hasInline ? inlineFiles : files;\n }\n\n class Locator {\n #type; #value; #options; #pageId;\n constructor(type, value, options, pageId) {\n this.#type = type;\n this.#value = value;\n this.#options = options;\n this.#pageId = pageId || \"page_0\";\n }\n\n _getInfo() { return [this.#type, this.#value, this.#options]; }\n _getPageId() { return this.#pageId; }\n\n // Helper to create a chained locator\n _chain(childType, childValue, childOptions) {\n const parentInfo = this._getInfo();\n const childInfo = [childType, childValue, childOptions];\n return new Locator(\"chained\", JSON.stringify([parentInfo, childInfo]), null, this.#pageId);\n }\n\n async click() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"click\", null], { pageId: this.#pageId });\n }\n async dblclick() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"dblclick\", null], { pageId: this.#pageId });\n }\n async fill(text) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"fill\", text], { pageId: this.#pageId });\n }\n async type(text) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"type\", text], { pageId: this.#pageId });\n }\n async check() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"check\", null], { pageId: this.#pageId });\n }\n async uncheck() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"uncheck\", null], { pageId: this.#pageId });\n }\n async selectOption(value) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"selectOption\", value], { pageId: this.#pageId });\n }\n async clear() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"clear\", null], { pageId: this.#pageId });\n }\n async press(key) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"press\", key], { pageId: this.#pageId });\n }\n async hover() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"hover\", null], { pageId: this.#pageId });\n }\n async focus() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"focus\", null], { pageId: this.#pageId });\n }\n async textContent() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getText\", null], { pageId: this.#pageId });\n }\n async inputValue() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getValue\", null], { pageId: this.#pageId });\n }\n async isVisible() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isVisible\", null], { pageId: this.#pageId });\n }\n async isEnabled() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isEnabled\", null], { pageId: this.#pageId });\n }\n async isChecked() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isChecked\", null], { pageId: this.#pageId });\n }\n async count() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"count\", null], { pageId: this.#pageId });\n }\n async getAttribute(name) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getAttribute\", name], { pageId: this.#pageId });\n }\n async isDisabled() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isDisabled\", null], { pageId: this.#pageId });\n }\n async isHidden() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isHidden\", null], { pageId: this.#pageId });\n }\n async innerHTML() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"innerHTML\", null], { pageId: this.#pageId });\n }\n async innerText() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"innerText\", null], { pageId: this.#pageId });\n }\n async allTextContents() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"allTextContents\", null], { pageId: this.#pageId });\n }\n async allInnerTexts() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"allInnerTexts\", null], { pageId: this.#pageId });\n }\n async waitFor(options) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"waitFor\", options || {}], { pageId: this.#pageId });\n }\n async boundingBox() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"boundingBox\", null], { pageId: this.#pageId });\n }\n async setInputFiles(files) {\n const serializedFiles = normalizeSetInputFilesArg(files);\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"setInputFiles\", serializedFiles], { pageId: this.#pageId });\n }\n async screenshot(options) {\n const base64 = await __pw_invoke(\"locatorAction\", [...this._getInfo(), \"screenshot\", options || {}], { pageId: this.#pageId });\n return base64;\n }\n async dragTo(target) {\n const targetInfo = target._getInfo();\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"dragTo\", targetInfo], { pageId: this.#pageId });\n }\n async scrollIntoViewIfNeeded() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"scrollIntoViewIfNeeded\", null], { pageId: this.#pageId });\n }\n async highlight() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"highlight\", null], { pageId: this.#pageId });\n }\n async evaluate(fn, arg) {\n const fnString = typeof fn === 'function' ? fn.toString() : fn;\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"evaluate\", [fnString, arg]], { pageId: this.#pageId });\n }\n async evaluateAll(fn, arg) {\n const fnString = typeof fn === 'function' ? fn.toString() : fn;\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"evaluateAll\", [fnString, arg]], { pageId: this.#pageId });\n }\n locator(selector) {\n return this._chain(\"css\", selector, null);\n }\n // Chaining: getBy* methods within a locator\n getByRole(role, options) {\n return this._chain(\"role\", role, serializeOptions(options));\n }\n getByText(text) {\n return this._chain(\"text\", text, null);\n }\n getByLabel(label) {\n return this._chain(\"label\", label, null);\n }\n getByPlaceholder(placeholder) {\n return this._chain(\"placeholder\", placeholder, null);\n }\n getByTestId(testId) {\n return this._chain(\"testId\", testId, null);\n }\n getByAltText(altText) {\n return this._chain(\"altText\", altText, null);\n }\n getByTitle(title) {\n return this._chain(\"title\", title, null);\n }\n async all() {\n const n = await this.count();\n const result = [];\n for (let i = 0; i < n; i++) {\n result.push(this.nth(i));\n }\n return result;\n }\n nth(index) {\n const existingOpts = this.#options ? JSON.parse(this.#options) : {};\n return new Locator(this.#type, this.#value, JSON.stringify({ ...existingOpts, nth: index }), this.#pageId);\n }\n first() {\n return this.nth(0);\n }\n last() {\n return this.nth(-1);\n }\n filter(options) {\n const existingOpts = this.#options ? JSON.parse(this.#options) : {};\n const serializedFilter = { ...options };\n // Use duck-typing RegExp detection (instanceof fails across isolated-vm boundary)\n const hasText = options.hasText;\n if (hasText && typeof hasText === 'object' && typeof hasText.source === 'string' && typeof hasText.flags === 'string') {\n serializedFilter.hasText = { $regex: hasText.source, $flags: hasText.flags };\n }\n const hasNotText = options.hasNotText;\n if (hasNotText && typeof hasNotText === 'object' && typeof hasNotText.source === 'string' && typeof hasNotText.flags === 'string') {\n serializedFilter.hasNotText = { $regex: hasNotText.source, $flags: hasNotText.flags };\n }\n // Serialize has/hasNot locators using duck-typing\n const has = options.has;\n if (has && typeof has === 'object' && typeof has._getInfo === 'function') {\n serializedFilter.has = { $locator: has._getInfo() };\n }\n const hasNot = options.hasNot;\n if (hasNot && typeof hasNot === 'object' && typeof hasNot._getInfo === 'function') {\n serializedFilter.hasNot = { $locator: hasNot._getInfo() };\n }\n return new Locator(this.#type, this.#value, JSON.stringify({ ...existingOpts, filter: serializedFilter }), this.#pageId);\n }\n or(other) {\n // Create a composite locator that matches either this or other\n const thisInfo = this._getInfo();\n const otherInfo = other._getInfo();\n return new Locator(\"or\", JSON.stringify([thisInfo, otherInfo]), null, this.#pageId);\n }\n and(other) {\n // Create a composite locator that matches both this and other\n const thisInfo = this._getInfo();\n const otherInfo = other._getInfo();\n return new Locator(\"and\", JSON.stringify([thisInfo, otherInfo]), null, this.#pageId);\n }\n }\n globalThis.Locator = Locator;\n})();\n`);\n\n // Extend expect with locator matchers (only if test-environment already defined expect)\n context.evalSync(`\n(function() {\n // Helper to create locator matchers\n function createLocatorMatchers(locator, baseMatchers) {\n const info = locator._getInfo();\n const pageId = locator._getPageId ? locator._getPageId() : \"page_0\";\n\n // Helper for serializing regex values\n function serializeExpected(expected) {\n if (expected instanceof RegExp) {\n return { $regex: expected.source, $flags: expected.flags };\n }\n return expected;\n }\n\n const locatorMatchers = {\n async toBeVisible(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeVisible\", null, false, options?.timeout], { pageId });\n },\n async toContainText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainText\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveValue(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveValue\", expected, false, options?.timeout], { pageId });\n },\n async toBeEnabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEnabled\", null, false, options?.timeout], { pageId });\n },\n async toBeChecked(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeChecked\", null, false, options?.timeout], { pageId });\n },\n async toHaveAttribute(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAttribute\", { name, value: serializeExpected(value) }, false, options?.timeout], { pageId });\n },\n async toHaveText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveText\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveCount(count, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCount\", count, false, options?.timeout], { pageId });\n },\n async toBeHidden(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeHidden\", null, false, options?.timeout], { pageId });\n },\n async toBeDisabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeDisabled\", null, false, options?.timeout], { pageId });\n },\n async toBeFocused(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeFocused\", null, false, options?.timeout], { pageId });\n },\n async toBeEmpty(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEmpty\", null, false, options?.timeout], { pageId });\n },\n // New matchers\n async toBeAttached(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeAttached\", null, false, options?.timeout], { pageId });\n },\n async toBeEditable(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEditable\", null, false, options?.timeout], { pageId });\n },\n async toHaveClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveClass\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toContainClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainClass\", expected, false, options?.timeout], { pageId });\n },\n async toHaveId(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveId\", expected, false, options?.timeout], { pageId });\n },\n async toBeInViewport(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeInViewport\", null, false, options?.timeout], { pageId });\n },\n async toHaveCSS(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCSS\", { name, value: serializeExpected(value) }, false, options?.timeout], { pageId });\n },\n async toHaveJSProperty(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveJSProperty\", { name, value }, false, options?.timeout], { pageId });\n },\n async toHaveAccessibleName(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleName\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveAccessibleDescription(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleDescription\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveRole(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveRole\", expected, false, options?.timeout], { pageId });\n },\n not: {\n async toBeVisible(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeVisible\", null, true, options?.timeout], { pageId });\n },\n async toContainText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainText\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveValue(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveValue\", expected, true, options?.timeout], { pageId });\n },\n async toBeEnabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEnabled\", null, true, options?.timeout], { pageId });\n },\n async toBeChecked(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeChecked\", null, true, options?.timeout], { pageId });\n },\n async toHaveAttribute(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAttribute\", { name, value: serializeExpected(value) }, true, options?.timeout], { pageId });\n },\n async toHaveText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveText\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveCount(count, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCount\", count, true, options?.timeout], { pageId });\n },\n async toBeHidden(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeHidden\", null, true, options?.timeout], { pageId });\n },\n async toBeDisabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeDisabled\", null, true, options?.timeout], { pageId });\n },\n async toBeFocused(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeFocused\", null, true, options?.timeout], { pageId });\n },\n async toBeEmpty(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEmpty\", null, true, options?.timeout], { pageId });\n },\n // New negated matchers\n async toBeAttached(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeAttached\", null, true, options?.timeout], { pageId });\n },\n async toBeEditable(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEditable\", null, true, options?.timeout], { pageId });\n },\n async toHaveClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveClass\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toContainClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainClass\", expected, true, options?.timeout], { pageId });\n },\n async toHaveId(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveId\", expected, true, options?.timeout], { pageId });\n },\n async toBeInViewport(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeInViewport\", null, true, options?.timeout], { pageId });\n },\n async toHaveCSS(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCSS\", { name, value: serializeExpected(value) }, true, options?.timeout], { pageId });\n },\n async toHaveJSProperty(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveJSProperty\", { name, value }, true, options?.timeout], { pageId });\n },\n async toHaveAccessibleName(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleName\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveAccessibleDescription(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleDescription\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveRole(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveRole\", expected, true, options?.timeout], { pageId });\n },\n }\n };\n\n // Merge locator matchers with base matchers from test-environment\n if (baseMatchers) {\n return {\n ...baseMatchers,\n ...locatorMatchers,\n not: { ...baseMatchers.not, ...locatorMatchers.not }\n };\n }\n return locatorMatchers;\n }\n\n // Helper to create page matchers\n function createPageMatchers(page, baseMatchers) {\n const pageId = page.__pageId || \"page_0\";\n\n function serializeExpected(expected) {\n if (expected instanceof RegExp) {\n return { $regex: expected.source, $flags: expected.flags };\n }\n return expected;\n }\n\n const pageMatchers = {\n async toHaveURL(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveURL\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveTitle(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveTitle\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n not: {\n async toHaveURL(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveURL\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveTitle(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveTitle\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n }\n };\n\n if (baseMatchers) {\n return {\n ...baseMatchers,\n ...pageMatchers,\n not: { ...baseMatchers.not, ...pageMatchers.not }\n };\n }\n return pageMatchers;\n }\n\n // Only extend expect if test-environment already defined it\n if (typeof globalThis.expect === 'function') {\n const originalExpect = globalThis.expect;\n globalThis.expect = function(actual) {\n const baseMatchers = originalExpect(actual);\n // If actual is a Locator, add locator-specific matchers\n if (actual && actual.constructor && actual.constructor.name === 'Locator') {\n return createLocatorMatchers(actual, baseMatchers);\n }\n // If actual is the page object (IsolatePage), add page-specific matchers\n if (actual && actual.__isPage === true) {\n return createPageMatchers(actual, baseMatchers);\n }\n return baseMatchers;\n };\n }\n // If test-environment not loaded, expect remains undefined\n})();\n`);\n\n // ========================================================================\n // Return Handle\n // ========================================================================\n\n return {\n dispose() {\n // Only remove listeners if page was provided directly\n if (page && requestHandler && responseHandler && requestFailedHandler && consoleHandler && pageErrorHandler) {\n page.off(\"request\", requestHandler);\n page.off(\"response\", responseHandler);\n page.off(\"requestfailed\", requestFailedHandler);\n page.off(\"console\", consoleHandler);\n page.off(\"pageerror\", pageErrorHandler);\n }\n browserConsoleLogs.length = 0;\n pageErrors.length = 0;\n networkRequests.length = 0;\n networkResponses.length = 0;\n requestFailures.length = 0;\n },\n getBrowserConsoleLogs() {\n return [...browserConsoleLogs];\n },\n getPageErrors() {\n return [...pageErrors];\n },\n getNetworkRequests() {\n return [...networkRequests];\n },\n getNetworkResponses() {\n return [...networkResponses];\n },\n getRequestFailures() {\n return [...requestFailures];\n },\n clearCollected() {\n browserConsoleLogs.length = 0;\n pageErrors.length = 0;\n networkRequests.length = 0;\n networkResponses.length = 0;\n requestFailures.length = 0;\n },\n };\n}\n"
|
|
5
|
+
"import ivm from \"@ricsam/isolated-vm\";\nimport type {\n PlaywrightOperation,\n} from \"../protocol/index.cjs\";\nimport {\n DEFAULT_PLAYWRIGHT_HANDLER_META,\n} from \"./types.cjs\";\nimport {\n ISOLATE_BROWSER_DESCRIPTOR_PROPERTY,\n ISOLATE_BROWSER_DESCRIPTOR_VALUE,\n} from \"../browser-source.cjs\";\n\n// Re-export handler functions from handler.ts\nexport {\n createPlaywrightHandler,\n defaultPlaywrightHandler,\n getDefaultPlaywrightHandlerMetadata,\n getPlaywrightHandlerMetadata,\n} from \"./handler.cjs\";\n\n// Re-export protocol types\nexport type { PlaywrightOperation, PlaywrightResult, PlaywrightEvent, PlaywrightFileData } from \"../protocol/index.cjs\";\nexport { DEFAULT_PLAYWRIGHT_HANDLER_META };\n\n// Re-export types from types.ts\nexport type {\n NetworkRequestInfo,\n NetworkResponseInfo,\n BrowserConsoleLogEntry,\n PageErrorInfo,\n RequestFailureInfo,\n PlaywrightCallback,\n PlaywrightHandlerMetadata,\n PlaywrightSetupOptions,\n PlaywrightHandle,\n} from \"./types.cjs\";\n\n// Import handler functions for use within this module\nimport {\n createPlaywrightHandler,\n getDefaultPlaywrightHandlerMetadata,\n} from \"./handler.cjs\";\nimport type {\n PlaywrightCallback,\n PlaywrightSetupOptions,\n PlaywrightHandle,\n NetworkRequestInfo,\n NetworkResponseInfo,\n BrowserConsoleLogEntry,\n PageErrorInfo,\n RequestFailureInfo,\n} from \"./types.cjs\";\n\n// ============================================================================\n// Predicate Support Wrapper for Remote Handlers\n// ============================================================================\n\n/**\n * Wraps a remote handler (no direct page access) to support predicate-based\n * waitFor* operations. Predicate ops are handled locally by issuing sub-operations\n * through the handler and evaluating the predicate in the isolate.\n */\nfunction wrapHandlerWithPredicateSupport(\n handler: PlaywrightCallback,\n evaluatePredicate: (predicateId: number, data: unknown) => boolean,\n defaultTimeout: number,\n): PlaywrightCallback {\n return async (op) => {\n switch (op.type) {\n case \"waitForURLPredicate\": {\n const [predicateId, customTimeout, waitUntil] = op.args as [number, number?, string?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const startTime = Date.now();\n const pollInterval = 100;\n\n while (true) {\n // Get current URL via the handler\n const urlResult = await handler({ type: \"url\", args: [], pageId: op.pageId, contextId: op.contextId });\n if (urlResult.ok) {\n try {\n if (evaluatePredicate(predicateId, urlResult.value as string)) {\n return { ok: true };\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n }\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for URL` } };\n }\n await new Promise(r => setTimeout(r, pollInterval));\n }\n }\n case \"waitForResponsePredicateFinish\": {\n const [initialListenerId, predicateId, customTimeout] = op.args as [string, number, number?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const broadMatcher = { type: 'regex' as const, value: { $regex: '.*', $flags: '' } };\n const startTime = Date.now();\n let currentListenerId = initialListenerId;\n\n while (true) {\n // Wait for response data from current listener\n const finishResult = await handler({\n type: \"waitForResponseFinish\",\n args: [currentListenerId],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!finishResult.ok) return finishResult;\n const responseData = finishResult.value as Record<string, unknown>;\n\n // Evaluate predicate\n try {\n const serialized = {\n method: '',\n headers: Object.entries((responseData.headers || {}) as Record<string, string>),\n url: responseData.url as string,\n status: responseData.status as number,\n statusText: responseData.statusText as string,\n body: (responseData.text as string) || '',\n };\n if (evaluatePredicate(predicateId, serialized)) {\n return finishResult;\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for response` } };\n }\n\n // Not matched — start next listener\n const remainingTimeout = effectiveTimeout > 0 ? Math.max(1, effectiveTimeout - (Date.now() - startTime)) : effectiveTimeout;\n const nextStartResult = await handler({\n type: \"waitForResponseStart\",\n args: [broadMatcher, remainingTimeout],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!nextStartResult.ok) return nextStartResult;\n currentListenerId = (nextStartResult.value as { listenerId: string }).listenerId;\n }\n }\n case \"waitForRequestPredicateFinish\": {\n const [initialListenerId, predicateId, customTimeout] = op.args as [string, number, number?];\n const effectiveTimeout = customTimeout ?? defaultTimeout;\n const broadMatcher = { type: 'regex' as const, value: { $regex: '.*', $flags: '' } };\n const startTime = Date.now();\n let currentListenerId = initialListenerId;\n\n while (true) {\n const finishResult = await handler({\n type: \"waitForRequestFinish\",\n args: [currentListenerId],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!finishResult.ok) return finishResult;\n const requestData = finishResult.value as Record<string, unknown>;\n\n try {\n const serialized = {\n method: requestData.method as string,\n headers: Object.entries((requestData.headers || {}) as Record<string, string>),\n url: requestData.url as string,\n body: (requestData.postData as string) || '',\n };\n if (evaluatePredicate(predicateId, serialized)) {\n return finishResult;\n }\n } catch (e) {\n const error = e as Error;\n return { ok: false, error: { name: error.name, message: error.message } };\n }\n\n if (effectiveTimeout > 0 && Date.now() - startTime >= effectiveTimeout) {\n return { ok: false, error: { name: \"Error\", message: `Timeout ${effectiveTimeout}ms exceeded waiting for request` } };\n }\n\n // Not matched — start next listener\n const remainingTimeout = effectiveTimeout > 0 ? Math.max(1, effectiveTimeout - (Date.now() - startTime)) : effectiveTimeout;\n const nextStartResult = await handler({\n type: \"waitForRequestStart\",\n args: [broadMatcher, remainingTimeout],\n pageId: op.pageId,\n contextId: op.contextId,\n });\n if (!nextStartResult.ok) return nextStartResult;\n currentListenerId = (nextStartResult.value as { listenerId: string }).listenerId;\n }\n }\n default:\n return handler(op);\n }\n };\n}\n\n// ============================================================================\n// Setup Playwright\n// ============================================================================\n\n/**\n * Set up playwright in an isolate context.\n *\n * For local use: provide `page` option (direct page access)\n * For remote use: provide `handler` option (callback pattern)\n */\nexport async function setupPlaywright(\n context: ivm.Context,\n options: PlaywrightSetupOptions\n): Promise<PlaywrightHandle> {\n const timeout = options.timeout ?? 30000;\n\n // Determine if we have a page or handler.\n // Handlers created via defaultPlaywrightHandler() carry page metadata so\n // event capture/collected data keeps working in handler-first mode.\n const explicitPage = \"page\" in options ? options.page : undefined;\n const handler = \"handler\" in options ? options.handler : undefined;\n const handlerMetadata = handler\n ? getDefaultPlaywrightHandlerMetadata(handler)\n : undefined;\n const page = explicitPage ?? handlerMetadata?.page;\n const hasDefaultPage = options.hasDefaultPage ?? Boolean(page);\n\n // Get lifecycle callbacks\n const createPage = \"createPage\" in options ? options.createPage : undefined;\n const createContext = \"createContext\" in options ? options.createContext : undefined;\n const readFile = \"readFile\" in options ? options.readFile : undefined;\n const writeFile = \"writeFile\" in options ? options.writeFile : undefined;\n\n if (!handler && !page) {\n throw new Error(\"Either page or handler must be provided to setupPlaywright\");\n }\n\n // State for collected data (only used when page is provided directly)\n const browserConsoleLogs: BrowserConsoleLogEntry[] = [];\n const pageErrors: PageErrorInfo[] = [];\n const networkRequests: NetworkRequestInfo[] = [];\n const networkResponses: NetworkResponseInfo[] = [];\n const requestFailures: RequestFailureInfo[] = [];\n\n const global = context.global;\n\n // ========================================================================\n // Event Capture (only when page is provided directly)\n // ========================================================================\n\n let requestHandler: ((request: import(\"playwright\").Request) => void) | undefined;\n let responseHandler: ((response: import(\"playwright\").Response) => void) | undefined;\n let requestFailedHandler: ((request: import(\"playwright\").Request) => void) | undefined;\n let consoleHandler: ((msg: import(\"playwright\").ConsoleMessage) => void) | undefined;\n let pageErrorHandler: ((error: Error) => void) | undefined;\n\n if (page) {\n // Get onEvent callback if provided\n const onEvent = \"onEvent\" in options ? options.onEvent : undefined;\n const contextId = \"ctx_0\";\n const pageId = \"page_0\";\n const requestIds = new WeakMap<import(\"playwright\").Request, string>();\n let nextRequestId = 1;\n const getRequestId = (request: import(\"playwright\").Request): string => {\n let requestId = requestIds.get(request);\n if (!requestId) {\n requestId = `req_${nextRequestId++}`;\n requestIds.set(request, requestId);\n }\n return requestId;\n };\n const toLocation = (\n location: { url?: string; lineNumber?: number; columnNumber?: number } | undefined,\n ): BrowserConsoleLogEntry[\"location\"] => {\n if (!location || (!location.url && location.lineNumber == null && location.columnNumber == null)) {\n return undefined;\n }\n\n return {\n url: location.url || undefined,\n lineNumber: location.lineNumber != null ? location.lineNumber + 1 : undefined,\n columnNumber: location.columnNumber != null ? location.columnNumber + 1 : undefined,\n };\n };\n\n requestHandler = (request: import(\"playwright\").Request) => {\n const info: NetworkRequestInfo = {\n contextId,\n pageId,\n requestId: getRequestId(request),\n url: request.url(),\n method: request.method(),\n headers: request.headers(),\n postData: request.postData() ?? undefined,\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n networkRequests.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"networkRequest\",\n contextId: info.contextId,\n pageId: info.pageId,\n requestId: info.requestId,\n url: info.url,\n method: info.method,\n headers: info.headers,\n postData: info.postData,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n responseHandler = (response: import(\"playwright\").Response) => {\n const request = response.request();\n const info: NetworkResponseInfo = {\n contextId,\n pageId,\n requestId: getRequestId(request),\n url: response.url(),\n status: response.status(),\n statusText: response.statusText(),\n headers: response.headers(),\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n networkResponses.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"networkResponse\",\n contextId: info.contextId,\n pageId: info.pageId,\n requestId: info.requestId,\n url: info.url,\n status: info.status,\n statusText: info.statusText,\n headers: info.headers,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n requestFailedHandler = (request: import(\"playwright\").Request) => {\n const info: RequestFailureInfo = {\n contextId,\n pageId,\n requestId: getRequestId(request),\n url: request.url(),\n method: request.method(),\n failureText: request.failure()?.errorText || \"request failed\",\n resourceType: request.resourceType(),\n timestamp: Date.now(),\n };\n requestFailures.push(info);\n\n if (onEvent) {\n onEvent({\n type: \"requestFailure\",\n contextId: info.contextId,\n pageId: info.pageId,\n requestId: info.requestId,\n url: info.url,\n method: info.method,\n failureText: info.failureText,\n resourceType: info.resourceType,\n timestamp: info.timestamp,\n });\n }\n };\n\n consoleHandler = (msg: import(\"playwright\").ConsoleMessage) => {\n const args = msg.args().map((arg) => String(arg));\n const entry: BrowserConsoleLogEntry = {\n contextId,\n pageId,\n level: msg.type(),\n stdout: args.join(\" \"),\n location: toLocation(msg.location()),\n timestamp: Date.now(),\n };\n browserConsoleLogs.push(entry);\n\n if (onEvent) {\n onEvent({\n type: \"browserConsoleLog\",\n contextId: entry.contextId,\n pageId: entry.pageId,\n level: entry.level,\n stdout: entry.stdout,\n location: entry.location,\n timestamp: entry.timestamp,\n });\n }\n\n // Print to stdout if console option is true\n if (\"console\" in options && options.console) {\n const prefix = `[browser:${entry.level}]`;\n console.log(prefix, entry.stdout);\n }\n };\n\n pageErrorHandler = (error: Error) => {\n const entry: PageErrorInfo = {\n contextId,\n pageId,\n name: error.name,\n message: error.message,\n stack: error.stack,\n timestamp: Date.now(),\n };\n pageErrors.push(entry);\n\n if (onEvent) {\n onEvent({\n type: \"pageError\",\n contextId: entry.contextId,\n pageId: entry.pageId,\n name: entry.name,\n message: entry.message,\n stack: entry.stack,\n timestamp: entry.timestamp,\n });\n }\n };\n\n page.on(\"request\", requestHandler);\n page.on(\"response\", responseHandler);\n page.on(\"requestfailed\", requestFailedHandler);\n page.on(\"console\", consoleHandler);\n page.on(\"pageerror\", pageErrorHandler);\n }\n\n // ========================================================================\n // Injected JavaScript\n // ========================================================================\n\n // Helper function to invoke handler and handle errors\n context.evalSync(`\n(function() {\n globalThis.__pw_invoke = async function(type, args, options) {\n const op = JSON.stringify({ type, args, pageId: options?.pageId, contextId: options?.contextId });\n const resultJson = await __Playwright_handler_ref.apply(\n undefined,\n [op],\n { result: { promise: true, copy: true } }\n );\n const result = JSON.parse(resultJson);\n if (result.ok) {\n return result.value;\n }\n const error = new Error(result.error.message);\n error.name = result.error.name;\n throw error;\n };\n})();\n`);\n\n // Predicate registry for waitForURL/Request/Response with function predicates\n context.evalSync(`\n(function() {\n const __pw_predicates = new Map();\n let __pw_next_id = 0;\n globalThis.__pw_register_predicate = function(fn) {\n const id = __pw_next_id++;\n __pw_predicates.set(id, fn);\n return id;\n };\n globalThis.__pw_unregister_predicate = function(id) {\n __pw_predicates.delete(id);\n };\n globalThis.__pw_evaluate_predicate = function(id, data) {\n const fn = __pw_predicates.get(id);\n if (!fn) throw new Error('Predicate not found: ' + id);\n const result = fn(data);\n if (result && typeof result === 'object' && typeof result.then === 'function') {\n throw new Error('Async predicates are not supported. Use a synchronous predicate function.');\n }\n return !!result;\n };\n})();\n`);\n\n // Get reference to the predicate evaluation function for host-side use\n const evaluatePredicateRef = context.global.getSync(\n '__pw_evaluate_predicate', { reference: true }\n ) as ivm.Reference<(id: number, data: unknown) => boolean>;\n\n // ========================================================================\n // Create Handler and Unified Handler Reference\n // ========================================================================\n\n const evaluatePredicateFn = (predicateId: number, data: unknown): boolean => {\n return evaluatePredicateRef.applySync(\n undefined,\n [new ivm.ExternalCopy(predicateId).copyInto(), new ivm.ExternalCopy(data).copyInto()]\n ) as boolean;\n };\n\n // Create handler with evaluatePredicate support.\n // When a page is available (either directly or through handler metadata),\n // create a handler with evaluatePredicate for efficient event-based predicate evaluation.\n // When only a remote handler is available (no page), wrap it to intercept predicate\n // operations and implement them via polling/sub-operations.\n let effectiveHandler: PlaywrightCallback;\n if (handler && handlerMetadata?.page) {\n // Handler-first mode with page metadata — recreate with evaluatePredicate\n effectiveHandler = createPlaywrightHandler(handlerMetadata.page, {\n ...handlerMetadata.options,\n evaluatePredicate: evaluatePredicateFn,\n });\n } else if (handler) {\n // Remote handler without page — wrap to handle predicate ops locally\n effectiveHandler = wrapHandlerWithPredicateSupport(handler, evaluatePredicateFn, timeout);\n } else if (page) {\n effectiveHandler = createPlaywrightHandler(page, {\n timeout,\n readFile,\n writeFile,\n createPage,\n createContext,\n evaluatePredicate: evaluatePredicateFn,\n });\n } else {\n throw new Error(\"Either page or handler must be provided to setupPlaywright\");\n }\n\n // Single handler reference that receives operation objects\n global.setSync(\n \"__Playwright_handler_ref\",\n new ivm.Reference(async (opJson: string): Promise<string> => {\n const op = JSON.parse(opJson) as PlaywrightOperation;\n const result = await effectiveHandler(op);\n return JSON.stringify(result);\n })\n );\n\n // IsolatePage class and browser globals\n context.evalSync(`\n(function() {\n // IsolatePage class - represents a page with a specific pageId\n class IsolatePage {\n #pageId; #contextId;\n constructor(pageId, contextId) {\n this.#pageId = pageId;\n this.#contextId = contextId;\n }\n get __isPage() { return true; }\n get __pageId() { return this.#pageId; }\n get __contextId() { return this.#contextId; }\n\n async goto(url, options) {\n await __pw_invoke(\"goto\", [url, options?.waitUntil || null], { pageId: this.#pageId });\n }\n async reload() {\n await __pw_invoke(\"reload\", [], { pageId: this.#pageId });\n }\n async url() { return __pw_invoke(\"url\", [], { pageId: this.#pageId }); }\n async title() { return __pw_invoke(\"title\", [], { pageId: this.#pageId }); }\n async content() { return __pw_invoke(\"content\", [], { pageId: this.#pageId }); }\n async waitForSelector(selector, options) {\n return __pw_invoke(\"waitForSelector\", [selector, options ? JSON.stringify(options) : null], { pageId: this.#pageId });\n }\n async waitForTimeout(ms) { return __pw_invoke(\"waitForTimeout\", [ms], { pageId: this.#pageId }); }\n async waitForLoadState(state) { return __pw_invoke(\"waitForLoadState\", [state || null], { pageId: this.#pageId }); }\n async evaluate(script, arg) {\n const hasArg = arguments.length > 1;\n if (hasArg) {\n const serialized = typeof script === \"function\" ? script.toString() : script;\n return __pw_invoke(\"evaluate\", [serialized, arg], { pageId: this.#pageId });\n }\n const serialized = typeof script === \"function\" ? \"(\" + script.toString() + \")()\" : script;\n return __pw_invoke(\"evaluate\", [serialized], { pageId: this.#pageId });\n }\n locator(selector) { return new Locator(\"css\", selector, null, this.#pageId); }\n getByRole(role, options) {\n if (options) {\n const serialized = { ...options };\n const name = options.name;\n if (name && typeof name === 'object' && typeof name.source === 'string' && typeof name.flags === 'string') {\n serialized.name = { $regex: name.source, $flags: name.flags };\n }\n return new Locator(\"role\", role, JSON.stringify(serialized), this.#pageId);\n }\n return new Locator(\"role\", role, null, this.#pageId);\n }\n getByText(text) { return new Locator(\"text\", text, null, this.#pageId); }\n getByLabel(label) { return new Locator(\"label\", label, null, this.#pageId); }\n getByPlaceholder(p) { return new Locator(\"placeholder\", p, null, this.#pageId); }\n getByTestId(id) { return new Locator(\"testId\", id, null, this.#pageId); }\n getByAltText(alt) { return new Locator(\"altText\", alt, null, this.#pageId); }\n getByTitle(title) { return new Locator(\"title\", title, null, this.#pageId); }\n frameLocator(selector) {\n const pageId = this.#pageId;\n return {\n locator(innerSelector) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"css\", innerSelector, null]]), null, pageId); },\n getByRole(role, options) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"role\", role, options ? JSON.stringify(options) : null]]), null, pageId); },\n getByText(text) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"text\", text, null]]), null, pageId); },\n getByLabel(label) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"label\", label, null]]), null, pageId); },\n getByPlaceholder(placeholder) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"placeholder\", placeholder, null]]), null, pageId); },\n getByTestId(testId) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"testId\", testId, null]]), null, pageId); },\n getByAltText(alt) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"altText\", alt, null]]), null, pageId); },\n getByTitle(title) { return new Locator(\"frame\", JSON.stringify([[\"css\", selector, null], [\"title\", title, null]]), null, pageId); },\n };\n }\n async goBack(options) {\n await __pw_invoke(\"goBack\", [options?.waitUntil || null], { pageId: this.#pageId });\n }\n async goForward(options) {\n await __pw_invoke(\"goForward\", [options?.waitUntil || null], { pageId: this.#pageId });\n }\n async waitForURL(url, options) {\n if (typeof url === 'function') {\n const predicateId = __pw_register_predicate(url);\n try {\n await __pw_invoke(\"waitForURLPredicate\", [predicateId, options?.timeout || null, options?.waitUntil || null], { pageId: this.#pageId });\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n return;\n }\n let serializedUrl;\n if (typeof url === 'string') {\n serializedUrl = { type: 'string', value: url };\n } else if (url && typeof url === 'object' && typeof url.source === 'string' && typeof url.flags === 'string') {\n serializedUrl = { type: 'regex', value: { $regex: url.source, $flags: url.flags } };\n } else {\n serializedUrl = url;\n }\n return __pw_invoke(\"waitForURL\", [serializedUrl, options?.timeout || null, options?.waitUntil || null], { pageId: this.#pageId });\n }\n async waitForRequest(urlOrPredicate, options) {\n if (typeof urlOrPredicate === 'function') {\n const userPredicate = urlOrPredicate;\n const wrappedPredicate = (data) => {\n const requestLike = {\n url: () => data.url,\n method: () => data.method,\n headers: () => Object.fromEntries(data.headers),\n headersArray: () => data.headers.map(h => ({ name: h[0], value: h[1] })),\n postData: () => data.body || null,\n };\n return userPredicate(requestLike);\n };\n const predicateId = __pw_register_predicate(wrappedPredicate);\n const pageId = this.#pageId;\n // Start listening immediately (before the user triggers the request)\n const broadMatcher = { type: 'regex', value: { $regex: '.*', $flags: '' } };\n const startResult = await __pw_invoke(\"waitForRequestStart\", [broadMatcher, options?.timeout || null], { pageId });\n const listenerId = startResult.listenerId;\n try {\n const r = await __pw_invoke(\"waitForRequestPredicateFinish\", [listenerId, predicateId, options?.timeout || null], { pageId });\n return { url: () => r.url, method: () => r.method, headers: () => r.headers, postData: () => r.postData };\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n }\n let serializedMatcher;\n if (typeof urlOrPredicate === 'string') {\n serializedMatcher = { type: 'string', value: urlOrPredicate };\n } else if (urlOrPredicate && typeof urlOrPredicate === 'object'\n && typeof urlOrPredicate.source === 'string'\n && typeof urlOrPredicate.flags === 'string') {\n serializedMatcher = { type: 'regex', value: { $regex: urlOrPredicate.source, $flags: urlOrPredicate.flags } };\n } else {\n throw new Error('waitForRequest requires a URL string, RegExp, or predicate function');\n }\n const startResult = await __pw_invoke(\"waitForRequestStart\", [serializedMatcher, options?.timeout || null], { pageId: this.#pageId });\n const listenerId = startResult.listenerId;\n const pageId = this.#pageId;\n const r = await __pw_invoke(\"waitForRequestFinish\", [listenerId], { pageId });\n return { url: () => r.url, method: () => r.method, headers: () => r.headers, postData: () => r.postData };\n }\n async waitForResponse(urlOrPredicate, options) {\n if (typeof urlOrPredicate === 'function') {\n const userPredicate = urlOrPredicate;\n const wrappedPredicate = (data) => {\n const responseLike = {\n url: () => data.url,\n status: () => data.status,\n statusText: () => data.statusText,\n headers: () => Object.fromEntries(data.headers),\n headersArray: () => data.headers.map(h => ({ name: h[0], value: h[1] })),\n ok: () => data.status >= 200 && data.status < 300,\n };\n return userPredicate(responseLike);\n };\n const predicateId = __pw_register_predicate(wrappedPredicate);\n const pageId = this.#pageId;\n // Start listening immediately (before the user triggers the response)\n const broadMatcher = { type: 'regex', value: { $regex: '.*', $flags: '' } };\n const startResult = await __pw_invoke(\"waitForResponseStart\", [broadMatcher, options?.timeout || null], { pageId });\n const listenerId = startResult.listenerId;\n try {\n const r = await __pw_invoke(\"waitForResponsePredicateFinish\", [listenerId, predicateId, options?.timeout || null], { pageId });\n return {\n url: () => r.url, status: () => r.status, statusText: () => r.statusText,\n headers: () => r.headers, headersArray: () => r.headersArray,\n ok: () => r.ok, json: async () => r.json, text: async () => r.text, body: async () => r.body,\n };\n } finally {\n __pw_unregister_predicate(predicateId);\n }\n }\n let serializedMatcher;\n if (typeof urlOrPredicate === 'string') {\n serializedMatcher = { type: 'string', value: urlOrPredicate };\n } else if (urlOrPredicate && typeof urlOrPredicate === 'object'\n && typeof urlOrPredicate.source === 'string'\n && typeof urlOrPredicate.flags === 'string') {\n serializedMatcher = { type: 'regex', value: { $regex: urlOrPredicate.source, $flags: urlOrPredicate.flags } };\n } else {\n throw new Error('waitForResponse requires a URL string, RegExp, or predicate function');\n }\n const startResult = await __pw_invoke(\"waitForResponseStart\", [serializedMatcher, options?.timeout || null], { pageId: this.#pageId });\n const listenerId = startResult.listenerId;\n const pageId = this.#pageId;\n const r = await __pw_invoke(\"waitForResponseFinish\", [listenerId], { pageId });\n return {\n url: () => r.url, status: () => r.status, statusText: () => r.statusText,\n headers: () => r.headers, headersArray: () => r.headersArray,\n ok: () => r.ok, json: async () => r.json, text: async () => r.text, body: async () => r.body,\n };\n }\n context() {\n const contextId = this.#contextId;\n return new IsolateContext(contextId);\n }\n async click(selector) { return this.locator(selector).click(); }\n async fill(selector, value) { return this.locator(selector).fill(value); }\n async textContent(selector) { return this.locator(selector).textContent(); }\n async innerText(selector) { return this.locator(selector).innerText(); }\n async innerHTML(selector) { return this.locator(selector).innerHTML(); }\n async getAttribute(selector, name) { return this.locator(selector).getAttribute(name); }\n async inputValue(selector) { return this.locator(selector).inputValue(); }\n async isVisible(selector) { return this.locator(selector).isVisible(); }\n async isEnabled(selector) { return this.locator(selector).isEnabled(); }\n async isChecked(selector) { return this.locator(selector).isChecked(); }\n async isHidden(selector) { return this.locator(selector).isHidden(); }\n async isDisabled(selector) { return this.locator(selector).isDisabled(); }\n async screenshot(options) { await __pw_invoke(\"screenshot\", [options || {}], { pageId: this.#pageId }); }\n async setViewportSize(size) { return __pw_invoke(\"setViewportSize\", [size], { pageId: this.#pageId }); }\n async viewportSize() { return __pw_invoke(\"viewportSize\", [], { pageId: this.#pageId }); }\n async emulateMedia(options) { return __pw_invoke(\"emulateMedia\", [options], { pageId: this.#pageId }); }\n async setExtraHTTPHeaders(headers) { return __pw_invoke(\"setExtraHTTPHeaders\", [headers], { pageId: this.#pageId }); }\n async bringToFront() { return __pw_invoke(\"bringToFront\", [], { pageId: this.#pageId }); }\n async close() { return __pw_invoke(\"close\", [], { pageId: this.#pageId }); }\n async isClosed() { return __pw_invoke(\"isClosed\", [], { pageId: this.#pageId }); }\n async pdf(options) { return __pw_invoke(\"pdf\", [options || {}], { pageId: this.#pageId }); }\n async pause() { return __pw_invoke(\"pause\", [], { pageId: this.#pageId }); }\n async frames() { return __pw_invoke(\"frames\", [], { pageId: this.#pageId }); }\n async mainFrame() { return __pw_invoke(\"mainFrame\", [], { pageId: this.#pageId }); }\n get keyboard() {\n const pageId = this.#pageId;\n return {\n async type(text, options) { return __pw_invoke(\"keyboardType\", [text, options], { pageId }); },\n async press(key, options) { return __pw_invoke(\"keyboardPress\", [key, options], { pageId }); },\n async down(key) { return __pw_invoke(\"keyboardDown\", [key], { pageId }); },\n async up(key) { return __pw_invoke(\"keyboardUp\", [key], { pageId }); },\n async insertText(text) { return __pw_invoke(\"keyboardInsertText\", [text], { pageId }); }\n };\n }\n get mouse() {\n const pageId = this.#pageId;\n return {\n async move(x, y, options) { return __pw_invoke(\"mouseMove\", [x, y, options], { pageId }); },\n async click(x, y, options) { return __pw_invoke(\"mouseClick\", [x, y, options], { pageId }); },\n async down(options) { return __pw_invoke(\"mouseDown\", [options], { pageId }); },\n async up(options) { return __pw_invoke(\"mouseUp\", [options], { pageId }); },\n async wheel(deltaX, deltaY) { return __pw_invoke(\"mouseWheel\", [deltaX, deltaY], { pageId }); }\n };\n }\n get request() {\n const pageId = this.#pageId;\n return {\n async fetch(url, options) {\n const result = await __pw_invoke(\"request\", [url, options?.method || \"GET\", options?.data, options?.headers], { pageId });\n return {\n status: () => result.status,\n ok: () => result.ok,\n headers: () => result.headers,\n json: async () => result.json,\n text: async () => result.text,\n body: async () => result.body,\n };\n },\n async get(url, options) { return this.fetch(url, { ...options, method: \"GET\" }); },\n async post(url, options) { return this.fetch(url, { ...options, method: \"POST\" }); },\n async put(url, options) { return this.fetch(url, { ...options, method: \"PUT\" }); },\n async delete(url, options) { return this.fetch(url, { ...options, method: \"DELETE\" }); },\n };\n }\n }\n globalThis.IsolatePage = IsolatePage;\n\n // IsolateContext class - represents a browser context with a specific contextId\n class IsolateContext {\n #contextId;\n constructor(contextId) { this.#contextId = contextId; }\n get __contextId() { return this.#contextId; }\n\n async newPage() {\n const result = await __pw_invoke(\"newPage\", [], { contextId: this.#contextId });\n return new IsolatePage(result.pageId, this.#contextId);\n }\n async close() { return __pw_invoke(\"closeContext\", [], { contextId: this.#contextId }); }\n async clearCookies() { return __pw_invoke(\"clearCookies\", [], { contextId: this.#contextId }); }\n async addCookies(cookies) { return __pw_invoke(\"addCookies\", [cookies], { contextId: this.#contextId }); }\n async cookies(urls) { return __pw_invoke(\"cookies\", [urls], { contextId: this.#contextId }); }\n async pages() {\n const pageIds = await __pw_invoke(\"pages\", [], { contextId: this.#contextId });\n return pageIds.map((pageId) => new IsolatePage(pageId, this.#contextId));\n }\n }\n globalThis.IsolateContext = IsolateContext;\n\n // browser global - for creating new contexts\n globalThis.browser = {\n async newContext(options) {\n const result = await __pw_invoke(\"newContext\", [options || null]);\n return new IsolateContext(result.contextId);\n },\n async contexts() {\n const contextIds = await __pw_invoke(\"contexts\", []);\n return contextIds.map((contextId) => new IsolateContext(contextId));\n }\n };\n Object.defineProperty(globalThis.browser, ${JSON.stringify(ISOLATE_BROWSER_DESCRIPTOR_PROPERTY)}, {\n value: ${JSON.stringify(ISOLATE_BROWSER_DESCRIPTOR_VALUE)},\n enumerable: false,\n configurable: false,\n writable: false,\n });\n\n if (${JSON.stringify(hasDefaultPage)}) {\n // context global - represents the default context\n globalThis.context = new IsolateContext(\"ctx_0\");\n\n // page global - represents the default page\n globalThis.page = new IsolatePage(\"page_0\", \"ctx_0\");\n } else {\n delete globalThis.context;\n delete globalThis.page;\n }\n})();\n`);\n\n // Locator class with pageId support\n context.evalSync(`\n(function() {\n // Helper to serialize options including RegExp\n function serializeOptions(options) {\n if (!options) return null;\n const serialized = { ...options };\n if (options.name && typeof options.name === 'object' && typeof options.name.source === 'string' && typeof options.name.flags === 'string') {\n serialized.name = { $regex: options.name.source, $flags: options.name.flags };\n }\n return JSON.stringify(serialized);\n }\n\n const INPUT_FILES_VALIDATION_ERROR =\n \"setInputFiles() expects a file path string, an array of file path strings, \" +\n \"a single inline file object ({ name, mimeType, buffer }), or an array of inline file objects.\";\n\n function isInlineFileObject(value) {\n return !!value\n && typeof value === 'object'\n && typeof value.name === 'string'\n && typeof value.mimeType === 'string'\n && 'buffer' in value;\n }\n\n function encodeInlineFileBuffer(buffer) {\n if (typeof buffer === 'string') {\n return buffer;\n }\n let bytes;\n if (buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(buffer);\n } else if (ArrayBuffer.isView(buffer)) {\n bytes = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n } else {\n throw new Error(\n \"setInputFiles() inline file buffer must be a base64 string, ArrayBuffer, or TypedArray.\"\n );\n }\n let binary = '';\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n }\n\n function serializeInlineFile(file) {\n return {\n name: file.name,\n mimeType: file.mimeType,\n buffer: encodeInlineFileBuffer(file.buffer),\n };\n }\n\n function normalizeSetInputFilesArg(files) {\n if (typeof files === 'string') {\n return files;\n }\n if (isInlineFileObject(files)) {\n return serializeInlineFile(files);\n }\n if (!Array.isArray(files)) {\n throw new Error(INPUT_FILES_VALIDATION_ERROR);\n }\n if (files.length === 0) {\n return [];\n }\n\n let hasPaths = false;\n let hasInline = false;\n const inlineFiles = [];\n\n for (const file of files) {\n if (typeof file === 'string') {\n hasPaths = true;\n continue;\n }\n if (isInlineFileObject(file)) {\n hasInline = true;\n inlineFiles.push(serializeInlineFile(file));\n continue;\n }\n throw new Error(INPUT_FILES_VALIDATION_ERROR);\n }\n\n if (hasPaths && hasInline) {\n throw new Error(\n \"setInputFiles() does not support mixing file paths and inline file objects in the same array.\"\n );\n }\n return hasInline ? inlineFiles : files;\n }\n\n class Locator {\n #type; #value; #options; #pageId;\n constructor(type, value, options, pageId) {\n this.#type = type;\n this.#value = value;\n this.#options = options;\n this.#pageId = pageId || \"page_0\";\n }\n\n _getInfo() { return [this.#type, this.#value, this.#options]; }\n _getPageId() { return this.#pageId; }\n\n // Helper to create a chained locator\n _chain(childType, childValue, childOptions) {\n const parentInfo = this._getInfo();\n const childInfo = [childType, childValue, childOptions];\n return new Locator(\"chained\", JSON.stringify([parentInfo, childInfo]), null, this.#pageId);\n }\n\n async click() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"click\", null], { pageId: this.#pageId });\n }\n async dblclick() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"dblclick\", null], { pageId: this.#pageId });\n }\n async fill(text) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"fill\", text], { pageId: this.#pageId });\n }\n async type(text) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"type\", text], { pageId: this.#pageId });\n }\n async check() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"check\", null], { pageId: this.#pageId });\n }\n async uncheck() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"uncheck\", null], { pageId: this.#pageId });\n }\n async selectOption(value) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"selectOption\", value], { pageId: this.#pageId });\n }\n async clear() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"clear\", null], { pageId: this.#pageId });\n }\n async press(key) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"press\", key], { pageId: this.#pageId });\n }\n async hover() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"hover\", null], { pageId: this.#pageId });\n }\n async focus() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"focus\", null], { pageId: this.#pageId });\n }\n async textContent() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getText\", null], { pageId: this.#pageId });\n }\n async inputValue() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getValue\", null], { pageId: this.#pageId });\n }\n async isVisible() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isVisible\", null], { pageId: this.#pageId });\n }\n async isEnabled() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isEnabled\", null], { pageId: this.#pageId });\n }\n async isChecked() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isChecked\", null], { pageId: this.#pageId });\n }\n async count() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"count\", null], { pageId: this.#pageId });\n }\n async getAttribute(name) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"getAttribute\", name], { pageId: this.#pageId });\n }\n async isDisabled() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isDisabled\", null], { pageId: this.#pageId });\n }\n async isHidden() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"isHidden\", null], { pageId: this.#pageId });\n }\n async innerHTML() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"innerHTML\", null], { pageId: this.#pageId });\n }\n async innerText() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"innerText\", null], { pageId: this.#pageId });\n }\n async allTextContents() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"allTextContents\", null], { pageId: this.#pageId });\n }\n async allInnerTexts() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"allInnerTexts\", null], { pageId: this.#pageId });\n }\n async waitFor(options) {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"waitFor\", options || {}], { pageId: this.#pageId });\n }\n async boundingBox() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"boundingBox\", null], { pageId: this.#pageId });\n }\n async setInputFiles(files) {\n const serializedFiles = normalizeSetInputFilesArg(files);\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"setInputFiles\", serializedFiles], { pageId: this.#pageId });\n }\n async screenshot(options) {\n await __pw_invoke(\"locatorAction\", [...this._getInfo(), \"screenshot\", options || {}], { pageId: this.#pageId });\n }\n async dragTo(target) {\n const targetInfo = target._getInfo();\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"dragTo\", targetInfo], { pageId: this.#pageId });\n }\n async scrollIntoViewIfNeeded() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"scrollIntoViewIfNeeded\", null], { pageId: this.#pageId });\n }\n async highlight() {\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"highlight\", null], { pageId: this.#pageId });\n }\n async evaluate(fn, arg) {\n const fnString = typeof fn === 'function' ? fn.toString() : fn;\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"evaluate\", [fnString, arg]], { pageId: this.#pageId });\n }\n async evaluateAll(fn, arg) {\n const fnString = typeof fn === 'function' ? fn.toString() : fn;\n return __pw_invoke(\"locatorAction\", [...this._getInfo(), \"evaluateAll\", [fnString, arg]], { pageId: this.#pageId });\n }\n locator(selector) {\n return this._chain(\"css\", selector, null);\n }\n // Chaining: getBy* methods within a locator\n getByRole(role, options) {\n return this._chain(\"role\", role, serializeOptions(options));\n }\n getByText(text) {\n return this._chain(\"text\", text, null);\n }\n getByLabel(label) {\n return this._chain(\"label\", label, null);\n }\n getByPlaceholder(placeholder) {\n return this._chain(\"placeholder\", placeholder, null);\n }\n getByTestId(testId) {\n return this._chain(\"testId\", testId, null);\n }\n getByAltText(altText) {\n return this._chain(\"altText\", altText, null);\n }\n getByTitle(title) {\n return this._chain(\"title\", title, null);\n }\n async all() {\n const n = await this.count();\n const result = [];\n for (let i = 0; i < n; i++) {\n result.push(this.nth(i));\n }\n return result;\n }\n nth(index) {\n const existingOpts = this.#options ? JSON.parse(this.#options) : {};\n return new Locator(this.#type, this.#value, JSON.stringify({ ...existingOpts, nth: index }), this.#pageId);\n }\n first() {\n return this.nth(0);\n }\n last() {\n return this.nth(-1);\n }\n filter(options) {\n const existingOpts = this.#options ? JSON.parse(this.#options) : {};\n const serializedFilter = { ...options };\n // Use duck-typing RegExp detection (instanceof fails across isolated-vm boundary)\n const hasText = options.hasText;\n if (hasText && typeof hasText === 'object' && typeof hasText.source === 'string' && typeof hasText.flags === 'string') {\n serializedFilter.hasText = { $regex: hasText.source, $flags: hasText.flags };\n }\n const hasNotText = options.hasNotText;\n if (hasNotText && typeof hasNotText === 'object' && typeof hasNotText.source === 'string' && typeof hasNotText.flags === 'string') {\n serializedFilter.hasNotText = { $regex: hasNotText.source, $flags: hasNotText.flags };\n }\n // Serialize has/hasNot locators using duck-typing\n const has = options.has;\n if (has && typeof has === 'object' && typeof has._getInfo === 'function') {\n serializedFilter.has = { $locator: has._getInfo() };\n }\n const hasNot = options.hasNot;\n if (hasNot && typeof hasNot === 'object' && typeof hasNot._getInfo === 'function') {\n serializedFilter.hasNot = { $locator: hasNot._getInfo() };\n }\n return new Locator(this.#type, this.#value, JSON.stringify({ ...existingOpts, filter: serializedFilter }), this.#pageId);\n }\n or(other) {\n // Create a composite locator that matches either this or other\n const thisInfo = this._getInfo();\n const otherInfo = other._getInfo();\n return new Locator(\"or\", JSON.stringify([thisInfo, otherInfo]), null, this.#pageId);\n }\n and(other) {\n // Create a composite locator that matches both this and other\n const thisInfo = this._getInfo();\n const otherInfo = other._getInfo();\n return new Locator(\"and\", JSON.stringify([thisInfo, otherInfo]), null, this.#pageId);\n }\n }\n globalThis.Locator = Locator;\n})();\n`);\n\n // Extend expect with locator matchers (only if test-environment already defined expect)\n context.evalSync(`\n(function() {\n // Helper to create locator matchers\n function createLocatorMatchers(locator, baseMatchers) {\n const info = locator._getInfo();\n const pageId = locator._getPageId ? locator._getPageId() : \"page_0\";\n\n // Helper for serializing regex values\n function serializeExpected(expected) {\n if (expected instanceof RegExp) {\n return { $regex: expected.source, $flags: expected.flags };\n }\n return expected;\n }\n\n const locatorMatchers = {\n async toBeVisible(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeVisible\", null, false, options?.timeout], { pageId });\n },\n async toContainText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainText\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveValue(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveValue\", expected, false, options?.timeout], { pageId });\n },\n async toBeEnabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEnabled\", null, false, options?.timeout], { pageId });\n },\n async toBeChecked(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeChecked\", null, false, options?.timeout], { pageId });\n },\n async toHaveAttribute(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAttribute\", { name, value: serializeExpected(value) }, false, options?.timeout], { pageId });\n },\n async toHaveText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveText\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveCount(count, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCount\", count, false, options?.timeout], { pageId });\n },\n async toBeHidden(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeHidden\", null, false, options?.timeout], { pageId });\n },\n async toBeDisabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeDisabled\", null, false, options?.timeout], { pageId });\n },\n async toBeFocused(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeFocused\", null, false, options?.timeout], { pageId });\n },\n async toBeEmpty(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEmpty\", null, false, options?.timeout], { pageId });\n },\n // New matchers\n async toBeAttached(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeAttached\", null, false, options?.timeout], { pageId });\n },\n async toBeEditable(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEditable\", null, false, options?.timeout], { pageId });\n },\n async toHaveClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveClass\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toContainClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainClass\", expected, false, options?.timeout], { pageId });\n },\n async toHaveId(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveId\", expected, false, options?.timeout], { pageId });\n },\n async toBeInViewport(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeInViewport\", null, false, options?.timeout], { pageId });\n },\n async toHaveCSS(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCSS\", { name, value: serializeExpected(value) }, false, options?.timeout], { pageId });\n },\n async toHaveJSProperty(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveJSProperty\", { name, value }, false, options?.timeout], { pageId });\n },\n async toHaveAccessibleName(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleName\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveAccessibleDescription(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleDescription\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveRole(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveRole\", expected, false, options?.timeout], { pageId });\n },\n not: {\n async toBeVisible(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeVisible\", null, true, options?.timeout], { pageId });\n },\n async toContainText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainText\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveValue(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveValue\", expected, true, options?.timeout], { pageId });\n },\n async toBeEnabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEnabled\", null, true, options?.timeout], { pageId });\n },\n async toBeChecked(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeChecked\", null, true, options?.timeout], { pageId });\n },\n async toHaveAttribute(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAttribute\", { name, value: serializeExpected(value) }, true, options?.timeout], { pageId });\n },\n async toHaveText(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveText\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveCount(count, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCount\", count, true, options?.timeout], { pageId });\n },\n async toBeHidden(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeHidden\", null, true, options?.timeout], { pageId });\n },\n async toBeDisabled(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeDisabled\", null, true, options?.timeout], { pageId });\n },\n async toBeFocused(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeFocused\", null, true, options?.timeout], { pageId });\n },\n async toBeEmpty(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEmpty\", null, true, options?.timeout], { pageId });\n },\n // New negated matchers\n async toBeAttached(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeAttached\", null, true, options?.timeout], { pageId });\n },\n async toBeEditable(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeEditable\", null, true, options?.timeout], { pageId });\n },\n async toHaveClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveClass\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toContainClass(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toContainClass\", expected, true, options?.timeout], { pageId });\n },\n async toHaveId(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveId\", expected, true, options?.timeout], { pageId });\n },\n async toBeInViewport(options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toBeInViewport\", null, true, options?.timeout], { pageId });\n },\n async toHaveCSS(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveCSS\", { name, value: serializeExpected(value) }, true, options?.timeout], { pageId });\n },\n async toHaveJSProperty(name, value, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveJSProperty\", { name, value }, true, options?.timeout], { pageId });\n },\n async toHaveAccessibleName(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleName\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveAccessibleDescription(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveAccessibleDescription\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveRole(expected, options) {\n return __pw_invoke(\"expectLocator\", [...info, \"toHaveRole\", expected, true, options?.timeout], { pageId });\n },\n }\n };\n\n // Merge locator matchers with base matchers from test-environment\n if (baseMatchers) {\n return {\n ...baseMatchers,\n ...locatorMatchers,\n not: { ...baseMatchers.not, ...locatorMatchers.not }\n };\n }\n return locatorMatchers;\n }\n\n // Helper to create page matchers\n function createPageMatchers(page, baseMatchers) {\n const pageId = page.__pageId || \"page_0\";\n\n function serializeExpected(expected) {\n if (expected instanceof RegExp) {\n return { $regex: expected.source, $flags: expected.flags };\n }\n return expected;\n }\n\n const pageMatchers = {\n async toHaveURL(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveURL\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n async toHaveTitle(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveTitle\", serializeExpected(expected), false, options?.timeout], { pageId });\n },\n not: {\n async toHaveURL(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveURL\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n async toHaveTitle(expected, options) {\n return __pw_invoke(\"expectPage\", [\"toHaveTitle\", serializeExpected(expected), true, options?.timeout], { pageId });\n },\n }\n };\n\n if (baseMatchers) {\n return {\n ...baseMatchers,\n ...pageMatchers,\n not: { ...baseMatchers.not, ...pageMatchers.not }\n };\n }\n return pageMatchers;\n }\n\n // Only extend expect if test-environment already defined it\n if (typeof globalThis.expect === 'function') {\n const originalExpect = globalThis.expect;\n globalThis.expect = function(actual) {\n const baseMatchers = originalExpect(actual);\n // If actual is a Locator, add locator-specific matchers\n if (actual && actual.constructor && actual.constructor.name === 'Locator') {\n return createLocatorMatchers(actual, baseMatchers);\n }\n // If actual is the page object (IsolatePage), add page-specific matchers\n if (actual && actual.__isPage === true) {\n return createPageMatchers(actual, baseMatchers);\n }\n return baseMatchers;\n };\n }\n // If test-environment not loaded, expect remains undefined\n})();\n`);\n\n // ========================================================================\n // Return Handle\n // ========================================================================\n\n return {\n dispose() {\n // Only remove listeners if page was provided directly\n if (page && requestHandler && responseHandler && requestFailedHandler && consoleHandler && pageErrorHandler) {\n page.off(\"request\", requestHandler);\n page.off(\"response\", responseHandler);\n page.off(\"requestfailed\", requestFailedHandler);\n page.off(\"console\", consoleHandler);\n page.off(\"pageerror\", pageErrorHandler);\n }\n browserConsoleLogs.length = 0;\n pageErrors.length = 0;\n networkRequests.length = 0;\n networkResponses.length = 0;\n requestFailures.length = 0;\n },\n getBrowserConsoleLogs() {\n return [...browserConsoleLogs];\n },\n getPageErrors() {\n return [...pageErrors];\n },\n getNetworkRequests() {\n return [...networkRequests];\n },\n getNetworkResponses() {\n return [...networkResponses];\n },\n getRequestFailures() {\n return [...requestFailures];\n },\n getTrackedResources() {\n return page\n ? { contexts: [\"ctx_0\"], pages: [\"page_0\"] }\n : { contexts: [], pages: [] };\n },\n clearCollected() {\n browserConsoleLogs.length = 0;\n pageErrors.length = 0;\n networkRequests.length = 0;\n networkResponses.length = 0;\n requestFailures.length = 0;\n },\n };\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAgB,IAAhB;AAMO,IAFP;AASO,IAJP;AA0BO,IAHP;AAwBA,SAAS,+BAA+B,CACtC,SACA,mBACA,gBACoB;AAAA,EACpB,OAAO,OAAO,OAAO;AAAA,IACnB,QAAQ,GAAG;AAAA,WACJ,uBAAuB;AAAA,QAC1B,OAAO,aAAa,eAAe,aAAa,GAAG;AAAA,QACnD,MAAM,mBAAmB,iBAAiB;AAAA,QAC1C,MAAM,YAAY,KAAK,IAAI;AAAA,QAC3B,MAAM,eAAe;AAAA,QAErB,OAAO,MAAM;AAAA,UAEX,MAAM,YAAY,MAAM,QAAQ,EAAE,MAAM,OAAO,MAAM,CAAC,GAAG,QAAQ,GAAG,QAAQ,WAAW,GAAG,UAAU,CAAC;AAAA,UACrG,IAAI,UAAU,IA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ts
|
|
40
40
|
var exports_types = {};
|
|
41
41
|
__export(exports_types, {
|
|
42
|
+
PLAYWRIGHT_HANDLER_META: () => PLAYWRIGHT_HANDLER_META,
|
|
42
43
|
DEFAULT_PLAYWRIGHT_HANDLER_META: () => DEFAULT_PLAYWRIGHT_HANDLER_META
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(exports_types);
|
|
45
46
|
var DEFAULT_PLAYWRIGHT_HANDLER_META = Symbol.for("./index.ts/default-handler-meta");
|
|
47
|
+
var PLAYWRIGHT_HANDLER_META = Symbol.for("./index.ts/handler-meta");
|
|
46
48
|
|
|
47
|
-
//# debugId=
|
|
49
|
+
//# debugId=4D9EC470354E064464756E2164756E21
|