@checkly/playwright-core 1.51.17 → 1.51.18-beta.2
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/lib/checkly/index.js +16 -0
- package/lib/checkly/secretsFilter.js +68 -1
- package/lib/client/fetch.js +10 -2
- package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/lib/server/bidi/third_party/bidiProtocolCore.js +152 -0
- package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/lib/server/chromium/protocol.d.js +16 -0
- package/lib/server/firefox/protocol.d.js +16 -0
- package/lib/server/pageBinding.js +88 -0
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/webkit/protocol.d.js +16 -0
- package/lib/utils/isomorphic/builtins.js +90 -0
- package/lib/utils/isomorphic/protocolFormatter.js +68 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +320 -0
- package/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/lib/vite/traceViewer/sw.bundle.js +3 -7888
- package/lib/vite/traceViewer/uiMode.html +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var protocolFormatter_exports = {};
|
|
20
|
+
__export(protocolFormatter_exports, {
|
|
21
|
+
formatProtocolParam: () => formatProtocolParam,
|
|
22
|
+
renderTitleForCall: () => renderTitleForCall
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(protocolFormatter_exports);
|
|
25
|
+
var import_protocolMetainfo = require("./protocolMetainfo");
|
|
26
|
+
function formatProtocolParam(params, name) {
|
|
27
|
+
if (!params)
|
|
28
|
+
return "";
|
|
29
|
+
if (name === "url") {
|
|
30
|
+
try {
|
|
31
|
+
const urlObject = new URL(params[name]);
|
|
32
|
+
if (urlObject.protocol === "data:")
|
|
33
|
+
return urlObject.protocol;
|
|
34
|
+
if (urlObject.protocol === "about:")
|
|
35
|
+
return params[name];
|
|
36
|
+
return urlObject.pathname + urlObject.search;
|
|
37
|
+
} catch (error) {
|
|
38
|
+
return params[name];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (name === "timeNumber") {
|
|
42
|
+
return new Date(params[name]).toString();
|
|
43
|
+
}
|
|
44
|
+
return deepParam(params, name);
|
|
45
|
+
}
|
|
46
|
+
function deepParam(params, name) {
|
|
47
|
+
const tokens = name.split(".");
|
|
48
|
+
let current = params;
|
|
49
|
+
for (const token of tokens) {
|
|
50
|
+
if (typeof current !== "object" || current === null)
|
|
51
|
+
return "";
|
|
52
|
+
current = current[token];
|
|
53
|
+
}
|
|
54
|
+
if (current === void 0)
|
|
55
|
+
return "";
|
|
56
|
+
return String(current);
|
|
57
|
+
}
|
|
58
|
+
function renderTitleForCall(metadata) {
|
|
59
|
+
const titleFormat = metadata.title ?? import_protocolMetainfo.methodMetainfo.get(metadata.type + "." + metadata.method)?.title ?? metadata.method;
|
|
60
|
+
return titleFormat.replace(/\{([^}]+)\}/g, (_, p1) => {
|
|
61
|
+
return formatProtocolParam(metadata.params, p1);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
formatProtocolParam,
|
|
67
|
+
renderTitleForCall
|
|
68
|
+
});
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var protocolMetainfo_exports = {};
|
|
20
|
+
__export(protocolMetainfo_exports, {
|
|
21
|
+
methodMetainfo: () => methodMetainfo
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(protocolMetainfo_exports);
|
|
24
|
+
const methodMetainfo = /* @__PURE__ */ new Map([
|
|
25
|
+
["APIRequestContext.fetch", { title: '{method} "{url}"' }],
|
|
26
|
+
["APIRequestContext.fetchResponseBody", { internal: true }],
|
|
27
|
+
["APIRequestContext.fetchLog", { internal: true }],
|
|
28
|
+
["APIRequestContext.storageState", { internal: true }],
|
|
29
|
+
["APIRequestContext.disposeAPIResponse", { internal: true }],
|
|
30
|
+
["APIRequestContext.dispose", { internal: true }],
|
|
31
|
+
["LocalUtils.zip", { internal: true }],
|
|
32
|
+
["LocalUtils.harOpen", { internal: true }],
|
|
33
|
+
["LocalUtils.harLookup", { internal: true }],
|
|
34
|
+
["LocalUtils.harClose", { internal: true }],
|
|
35
|
+
["LocalUtils.harUnzip", { internal: true }],
|
|
36
|
+
["LocalUtils.connect", { internal: true }],
|
|
37
|
+
["LocalUtils.tracingStarted", { internal: true }],
|
|
38
|
+
["LocalUtils.addStackToTracingNoReply", { internal: true }],
|
|
39
|
+
["LocalUtils.traceDiscarded", { internal: true }],
|
|
40
|
+
["LocalUtils.globToRegex", { internal: true }],
|
|
41
|
+
["Root.initialize", { internal: true }],
|
|
42
|
+
["Playwright.newRequest", { title: "Create request context" }],
|
|
43
|
+
["DebugController.initialize", { internal: true }],
|
|
44
|
+
["DebugController.setReportStateChanged", { internal: true }],
|
|
45
|
+
["DebugController.resetForReuse", { internal: true }],
|
|
46
|
+
["DebugController.navigate", { internal: true }],
|
|
47
|
+
["DebugController.setRecorderMode", { internal: true }],
|
|
48
|
+
["DebugController.highlight", { internal: true }],
|
|
49
|
+
["DebugController.hideHighlight", { internal: true }],
|
|
50
|
+
["DebugController.resume", { internal: true }],
|
|
51
|
+
["DebugController.kill", { internal: true }],
|
|
52
|
+
["DebugController.closeAllBrowsers", { internal: true }],
|
|
53
|
+
["SocksSupport.socksConnected", { internal: true }],
|
|
54
|
+
["SocksSupport.socksFailed", { internal: true }],
|
|
55
|
+
["SocksSupport.socksData", { internal: true }],
|
|
56
|
+
["SocksSupport.socksError", { internal: true }],
|
|
57
|
+
["SocksSupport.socksEnd", { internal: true }],
|
|
58
|
+
["BrowserType.launch", { title: "Launch browser" }],
|
|
59
|
+
["BrowserType.launchPersistentContext", { title: "Launch persistent context" }],
|
|
60
|
+
["BrowserType.connectOverCDP", { title: "Connect over CDP" }],
|
|
61
|
+
["Browser.close", { title: "Close browser" }],
|
|
62
|
+
["Browser.killForTests", { internal: true }],
|
|
63
|
+
["Browser.defaultUserAgentForTest", { internal: true }],
|
|
64
|
+
["Browser.newContext", { title: "Create context" }],
|
|
65
|
+
["Browser.newContextForReuse", { internal: true }],
|
|
66
|
+
["Browser.stopPendingOperations", { internal: true, title: "Stop pending operations" }],
|
|
67
|
+
["Browser.newBrowserCDPSession", { internal: true, title: "Create CDP session" }],
|
|
68
|
+
["Browser.startTracing", { internal: true }],
|
|
69
|
+
["Browser.stopTracing", { internal: true }],
|
|
70
|
+
["EventTarget.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
71
|
+
["BrowserContext.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
72
|
+
["Page.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
73
|
+
["WebSocket.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
74
|
+
["ElectronApplication.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
75
|
+
["AndroidDevice.waitForEventInfo", { title: 'Wait for event "{info.event}"', snapshot: true }],
|
|
76
|
+
["BrowserContext.addCookies", { title: "Add cookies" }],
|
|
77
|
+
["BrowserContext.addInitScript", { title: "Add init script" }],
|
|
78
|
+
["BrowserContext.clearCookies", { title: "Clear cookies" }],
|
|
79
|
+
["BrowserContext.clearPermissions", { title: "Clear permissions" }],
|
|
80
|
+
["BrowserContext.close", { title: "Close context" }],
|
|
81
|
+
["BrowserContext.cookies", { title: "Get cookies" }],
|
|
82
|
+
["BrowserContext.exposeBinding", { title: "Expose binding" }],
|
|
83
|
+
["BrowserContext.grantPermissions", { title: "Grant permissions" }],
|
|
84
|
+
["BrowserContext.newPage", { title: "Create page" }],
|
|
85
|
+
["BrowserContext.registerSelectorEngine", { internal: true }],
|
|
86
|
+
["BrowserContext.setTestIdAttributeName", { internal: true }],
|
|
87
|
+
["BrowserContext.setExtraHTTPHeaders", { title: "Set extra HTTP headers" }],
|
|
88
|
+
["BrowserContext.setGeolocation", { title: "Set geolocation" }],
|
|
89
|
+
["BrowserContext.setHTTPCredentials", { title: "Set HTTP credentials" }],
|
|
90
|
+
["BrowserContext.setNetworkInterceptionPatterns", { internal: true }],
|
|
91
|
+
["BrowserContext.setWebSocketInterceptionPatterns", { internal: true }],
|
|
92
|
+
["BrowserContext.setOffline", { title: "Set offline mode" }],
|
|
93
|
+
["BrowserContext.storageState", { title: "Get storage state" }],
|
|
94
|
+
["BrowserContext.pause", { title: "Pause" }],
|
|
95
|
+
["BrowserContext.enableRecorder", { internal: true }],
|
|
96
|
+
["BrowserContext.newCDPSession", { internal: true }],
|
|
97
|
+
["BrowserContext.harStart", { internal: true }],
|
|
98
|
+
["BrowserContext.harExport", { internal: true }],
|
|
99
|
+
["BrowserContext.createTempFiles", { internal: true }],
|
|
100
|
+
["BrowserContext.updateSubscription", { internal: true }],
|
|
101
|
+
["BrowserContext.clockFastForward", { title: 'Fast forward clock "{ticksNumber}{ticksString}"' }],
|
|
102
|
+
["BrowserContext.clockInstall", { title: 'Install clock "{timeNumber}{timeString}"' }],
|
|
103
|
+
["BrowserContext.clockPauseAt", { title: 'Pause clock "{timeNumber}{timeString}"' }],
|
|
104
|
+
["BrowserContext.clockResume", { title: "Resume clock" }],
|
|
105
|
+
["BrowserContext.clockRunFor", { title: 'Run clock "{ticksNumber}{ticksString}"' }],
|
|
106
|
+
["BrowserContext.clockSetFixedTime", { title: 'Set fixed time "{timeNumber}{timeString}"' }],
|
|
107
|
+
["BrowserContext.clockSetSystemTime", { title: 'Set system time "{timeNumber}{timeString}"' }],
|
|
108
|
+
["Page.addInitScript", {}],
|
|
109
|
+
["Page.close", { title: "Close" }],
|
|
110
|
+
["Page.emulateMedia", { title: "Emulate media", snapshot: true }],
|
|
111
|
+
["Page.exposeBinding", { title: "Expose binding" }],
|
|
112
|
+
["Page.goBack", { title: "Go back", slowMo: true, snapshot: true }],
|
|
113
|
+
["Page.goForward", { title: "Go forward", slowMo: true, snapshot: true }],
|
|
114
|
+
["Page.requestGC", { title: "Request garbage collection" }],
|
|
115
|
+
["Page.registerLocatorHandler", { title: "Register locator handler" }],
|
|
116
|
+
["Page.resolveLocatorHandlerNoReply", { internal: true }],
|
|
117
|
+
["Page.unregisterLocatorHandler", { title: "Unregister locator handler" }],
|
|
118
|
+
["Page.reload", { title: "Reload", slowMo: true, snapshot: true }],
|
|
119
|
+
["Page.expectScreenshot", { title: "Expect screenshot", snapshot: true }],
|
|
120
|
+
["Page.screenshot", { title: "Screenshot", snapshot: true }],
|
|
121
|
+
["Page.setExtraHTTPHeaders", { title: "Set extra HTTP headers" }],
|
|
122
|
+
["Page.setNetworkInterceptionPatterns", { internal: true }],
|
|
123
|
+
["Page.setWebSocketInterceptionPatterns", { internal: true }],
|
|
124
|
+
["Page.setViewportSize", { title: "Set viewport size", snapshot: true }],
|
|
125
|
+
["Page.keyboardDown", { title: 'Key down "{key}"', slowMo: true, snapshot: true }],
|
|
126
|
+
["Page.keyboardUp", { title: 'Key up "{key}"', slowMo: true, snapshot: true }],
|
|
127
|
+
["Page.keyboardInsertText", { title: 'Insert "{text}"', slowMo: true, snapshot: true }],
|
|
128
|
+
["Page.keyboardType", { title: 'Type "{text}"', slowMo: true, snapshot: true }],
|
|
129
|
+
["Page.keyboardPress", { title: 'Press "{key}"', slowMo: true, snapshot: true }],
|
|
130
|
+
["Page.mouseMove", { title: "Mouse move", slowMo: true, snapshot: true }],
|
|
131
|
+
["Page.mouseDown", { title: "Mouse down", slowMo: true, snapshot: true }],
|
|
132
|
+
["Page.mouseUp", { title: "Mouse up", slowMo: true, snapshot: true }],
|
|
133
|
+
["Page.mouseClick", { title: "Click", slowMo: true, snapshot: true }],
|
|
134
|
+
["Page.mouseWheel", { title: "Mouse wheel", slowMo: true, snapshot: true }],
|
|
135
|
+
["Page.touchscreenTap", { title: "Tap", slowMo: true, snapshot: true }],
|
|
136
|
+
["Page.accessibilitySnapshot", { internal: true, snapshot: true }],
|
|
137
|
+
["Page.pdf", { title: "PDF" }],
|
|
138
|
+
["Page.snapshotForAI", { internal: true, snapshot: true }],
|
|
139
|
+
["Page.startJSCoverage", { internal: true }],
|
|
140
|
+
["Page.stopJSCoverage", { internal: true }],
|
|
141
|
+
["Page.startCSSCoverage", { internal: true }],
|
|
142
|
+
["Page.stopCSSCoverage", { internal: true }],
|
|
143
|
+
["Page.bringToFront", { title: "Bring to front" }],
|
|
144
|
+
["Page.updateSubscription", { internal: true }],
|
|
145
|
+
["Frame.evalOnSelector", { title: "Evaluate", snapshot: true }],
|
|
146
|
+
["Frame.evalOnSelectorAll", { title: "Evaluate", snapshot: true }],
|
|
147
|
+
["Frame.addScriptTag", { title: "Add script tag", snapshot: true }],
|
|
148
|
+
["Frame.addStyleTag", { title: "Add style tag", snapshot: true }],
|
|
149
|
+
["Frame.ariaSnapshot", { title: "Aria snapshot", snapshot: true }],
|
|
150
|
+
["Frame.blur", { title: "Blur", slowMo: true, snapshot: true }],
|
|
151
|
+
["Frame.check", { title: "Check", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
152
|
+
["Frame.click", { title: "Click", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
153
|
+
["Frame.content", { title: "Get content", snapshot: true }],
|
|
154
|
+
["Frame.dragAndDrop", { title: "Drag and drop", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
155
|
+
["Frame.dblclick", { title: "Double click", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
156
|
+
["Frame.dispatchEvent", { title: 'Dispatch "{type}"', slowMo: true, snapshot: true }],
|
|
157
|
+
["Frame.evaluateExpression", { title: "Evaluate", snapshot: true }],
|
|
158
|
+
["Frame.evaluateExpressionHandle", { title: "Evaluate", snapshot: true }],
|
|
159
|
+
["Frame.fill", { title: 'Fill "{value}"', slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
160
|
+
["Frame.focus", { title: "Focus", slowMo: true, snapshot: true }],
|
|
161
|
+
["Frame.frameElement", { internal: true }],
|
|
162
|
+
["Frame.highlight", { internal: true }],
|
|
163
|
+
["Frame.getAttribute", { internal: true, snapshot: true }],
|
|
164
|
+
["Frame.goto", { title: 'Navigate to "{url}"', slowMo: true, snapshot: true }],
|
|
165
|
+
["Frame.hover", { title: "Hover", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
166
|
+
["Frame.innerHTML", { title: "Get HTML", snapshot: true }],
|
|
167
|
+
["Frame.innerText", { title: "Get inner text", snapshot: true }],
|
|
168
|
+
["Frame.inputValue", { title: "Get input value", snapshot: true }],
|
|
169
|
+
["Frame.isChecked", { title: "Is checked", snapshot: true }],
|
|
170
|
+
["Frame.isDisabled", { title: "Is disabled", snapshot: true }],
|
|
171
|
+
["Frame.isEnabled", { title: "Is enabled", snapshot: true }],
|
|
172
|
+
["Frame.isHidden", { title: "Is hidden", snapshot: true }],
|
|
173
|
+
["Frame.isVisible", { title: "Is visible", snapshot: true }],
|
|
174
|
+
["Frame.isEditable", { title: "Is editable", snapshot: true }],
|
|
175
|
+
["Frame.press", { title: 'Press "{key}"', slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
176
|
+
["Frame.querySelector", { title: "Query selector", snapshot: true }],
|
|
177
|
+
["Frame.querySelectorAll", { title: "Query selector all", snapshot: true }],
|
|
178
|
+
["Frame.queryCount", { title: "Query count", snapshot: true }],
|
|
179
|
+
["Frame.selectOption", { title: "Select option", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
180
|
+
["Frame.setContent", { title: "Set content", snapshot: true }],
|
|
181
|
+
["Frame.setInputFiles", { title: "Set input files", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
182
|
+
["Frame.tap", { title: "Tap", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
183
|
+
["Frame.textContent", { title: "Get text content", snapshot: true }],
|
|
184
|
+
["Frame.title", { internal: true }],
|
|
185
|
+
["Frame.type", { title: "Type", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
186
|
+
["Frame.uncheck", { title: "Uncheck", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
187
|
+
["Frame.waitForTimeout", { title: "Wait for timeout", snapshot: true }],
|
|
188
|
+
["Frame.waitForFunction", { title: "Wait for function", snapshot: true }],
|
|
189
|
+
["Frame.waitForSelector", { title: "Wait for selector", snapshot: true }],
|
|
190
|
+
["Frame.expect", { title: 'Expect "{expression}"', snapshot: true }],
|
|
191
|
+
["Worker.evaluateExpression", { title: "Evaluate" }],
|
|
192
|
+
["Worker.evaluateExpressionHandle", { title: "Evaluate" }],
|
|
193
|
+
["JSHandle.dispose", {}],
|
|
194
|
+
["ElementHandle.dispose", {}],
|
|
195
|
+
["JSHandle.evaluateExpression", { title: "Evaluate", snapshot: true }],
|
|
196
|
+
["ElementHandle.evaluateExpression", { title: "Evaluate", snapshot: true }],
|
|
197
|
+
["JSHandle.evaluateExpressionHandle", { title: "Evaluate", snapshot: true }],
|
|
198
|
+
["ElementHandle.evaluateExpressionHandle", { title: "Evaluate", snapshot: true }],
|
|
199
|
+
["JSHandle.getPropertyList", { internal: true }],
|
|
200
|
+
["ElementHandle.getPropertyList", { internal: true }],
|
|
201
|
+
["JSHandle.getProperty", { internal: true }],
|
|
202
|
+
["ElementHandle.getProperty", { internal: true }],
|
|
203
|
+
["JSHandle.jsonValue", { internal: true }],
|
|
204
|
+
["ElementHandle.jsonValue", { internal: true }],
|
|
205
|
+
["ElementHandle.evalOnSelector", { title: "Evaluate", snapshot: true }],
|
|
206
|
+
["ElementHandle.evalOnSelectorAll", { title: "Evaluate", snapshot: true }],
|
|
207
|
+
["ElementHandle.boundingBox", { title: "Get bounding box", snapshot: true }],
|
|
208
|
+
["ElementHandle.check", { title: "Check", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
209
|
+
["ElementHandle.click", { title: "Click", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
210
|
+
["ElementHandle.contentFrame", { internal: true, snapshot: true }],
|
|
211
|
+
["ElementHandle.dblclick", { title: "Double click", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
212
|
+
["ElementHandle.dispatchEvent", { title: "Dispatch event", slowMo: true, snapshot: true }],
|
|
213
|
+
["ElementHandle.fill", { title: 'Fill "{value}"', slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
214
|
+
["ElementHandle.focus", { title: "Focus", slowMo: true, snapshot: true }],
|
|
215
|
+
["ElementHandle.generateLocatorString", { internal: true }],
|
|
216
|
+
["ElementHandle.getAttribute", { internal: true }],
|
|
217
|
+
["ElementHandle.hover", { title: "Hover", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
218
|
+
["ElementHandle.innerHTML", { title: "Get HTML", snapshot: true }],
|
|
219
|
+
["ElementHandle.innerText", { title: "Get inner text", snapshot: true }],
|
|
220
|
+
["ElementHandle.inputValue", { title: "Get input value", snapshot: true }],
|
|
221
|
+
["ElementHandle.isChecked", { title: "Is checked", snapshot: true }],
|
|
222
|
+
["ElementHandle.isDisabled", { title: "Is disabled", snapshot: true }],
|
|
223
|
+
["ElementHandle.isEditable", { title: "Is editable", snapshot: true }],
|
|
224
|
+
["ElementHandle.isEnabled", { title: "Is enabled", snapshot: true }],
|
|
225
|
+
["ElementHandle.isHidden", { title: "Is hidden", snapshot: true }],
|
|
226
|
+
["ElementHandle.isVisible", { title: "Is visible", snapshot: true }],
|
|
227
|
+
["ElementHandle.ownerFrame", { title: "Get owner frame" }],
|
|
228
|
+
["ElementHandle.press", { title: 'Press "{key}"', slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
229
|
+
["ElementHandle.querySelector", { title: "Query selector", snapshot: true }],
|
|
230
|
+
["ElementHandle.querySelectorAll", { title: "Query selector all", snapshot: true }],
|
|
231
|
+
["ElementHandle.screenshot", { title: "Screenshot", snapshot: true }],
|
|
232
|
+
["ElementHandle.scrollIntoViewIfNeeded", { title: "Scroll into view", slowMo: true, snapshot: true }],
|
|
233
|
+
["ElementHandle.selectOption", { title: "Select option", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
234
|
+
["ElementHandle.selectText", { title: "Select text", slowMo: true, snapshot: true }],
|
|
235
|
+
["ElementHandle.setInputFiles", { title: "Set input files", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
236
|
+
["ElementHandle.tap", { title: "Tap", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
237
|
+
["ElementHandle.textContent", { title: "Get text content", snapshot: true }],
|
|
238
|
+
["ElementHandle.type", { title: "Type", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
239
|
+
["ElementHandle.uncheck", { title: "Uncheck", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
240
|
+
["ElementHandle.waitForElementState", { title: "Wait for state", snapshot: true }],
|
|
241
|
+
["ElementHandle.waitForSelector", { title: "Wait for selector", snapshot: true }],
|
|
242
|
+
["Request.response", { internal: true }],
|
|
243
|
+
["Request.rawRequestHeaders", { internal: true }],
|
|
244
|
+
["Route.redirectNavigationRequest", { internal: true }],
|
|
245
|
+
["Route.abort", {}],
|
|
246
|
+
["Route.continue", { internal: true }],
|
|
247
|
+
["Route.fulfill", { internal: true }],
|
|
248
|
+
["WebSocketRoute.connect", { internal: true }],
|
|
249
|
+
["WebSocketRoute.ensureOpened", { internal: true }],
|
|
250
|
+
["WebSocketRoute.sendToPage", { internal: true }],
|
|
251
|
+
["WebSocketRoute.sendToServer", { internal: true }],
|
|
252
|
+
["WebSocketRoute.closePage", { internal: true }],
|
|
253
|
+
["WebSocketRoute.closeServer", { internal: true }],
|
|
254
|
+
["Response.body", { internal: true }],
|
|
255
|
+
["Response.securityDetails", { internal: true }],
|
|
256
|
+
["Response.serverAddr", { internal: true }],
|
|
257
|
+
["Response.rawResponseHeaders", { internal: true }],
|
|
258
|
+
["Response.sizes", { internal: true }],
|
|
259
|
+
["BindingCall.reject", { internal: true }],
|
|
260
|
+
["BindingCall.resolve", { internal: true }],
|
|
261
|
+
["Dialog.accept", { title: "Accept dialog" }],
|
|
262
|
+
["Dialog.dismiss", { title: "Dismiss dialog" }],
|
|
263
|
+
["Tracing.tracingStart", { internal: true }],
|
|
264
|
+
["Tracing.tracingStartChunk", { internal: true }],
|
|
265
|
+
["Tracing.tracingGroup", { title: 'Trace "{name}"' }],
|
|
266
|
+
["Tracing.tracingGroupEnd", { title: "Group end" }],
|
|
267
|
+
["Tracing.tracingStopChunk", { internal: true }],
|
|
268
|
+
["Tracing.tracingStop", { internal: true }],
|
|
269
|
+
["Artifact.pathAfterFinished", { internal: true }],
|
|
270
|
+
["Artifact.saveAs", { internal: true }],
|
|
271
|
+
["Artifact.saveAsStream", { internal: true }],
|
|
272
|
+
["Artifact.failure", { internal: true }],
|
|
273
|
+
["Artifact.stream", { internal: true }],
|
|
274
|
+
["Artifact.cancel", { internal: true }],
|
|
275
|
+
["Artifact.delete", { internal: true }],
|
|
276
|
+
["Stream.read", { internal: true }],
|
|
277
|
+
["Stream.close", { internal: true }],
|
|
278
|
+
["WritableStream.write", { internal: true }],
|
|
279
|
+
["WritableStream.close", { internal: true }],
|
|
280
|
+
["CDPSession.send", { internal: true }],
|
|
281
|
+
["CDPSession.detach", { internal: true }],
|
|
282
|
+
["Electron.launch", { title: "Launch electron" }],
|
|
283
|
+
["ElectronApplication.browserWindow", { internal: true }],
|
|
284
|
+
["ElectronApplication.evaluateExpression", { title: "Evaluate" }],
|
|
285
|
+
["ElectronApplication.evaluateExpressionHandle", { title: "Evaluate" }],
|
|
286
|
+
["ElectronApplication.updateSubscription", { internal: true }],
|
|
287
|
+
["Android.devices", { internal: true }],
|
|
288
|
+
["AndroidSocket.write", { internal: true }],
|
|
289
|
+
["AndroidSocket.close", { internal: true }],
|
|
290
|
+
["AndroidDevice.wait", {}],
|
|
291
|
+
["AndroidDevice.fill", { title: 'Fill "{text}"' }],
|
|
292
|
+
["AndroidDevice.tap", { title: "Tap" }],
|
|
293
|
+
["AndroidDevice.drag", { title: "Drag" }],
|
|
294
|
+
["AndroidDevice.fling", { title: "Fling" }],
|
|
295
|
+
["AndroidDevice.longTap", { title: "Long tap" }],
|
|
296
|
+
["AndroidDevice.pinchClose", { title: "Pinch close" }],
|
|
297
|
+
["AndroidDevice.pinchOpen", { title: "Pinch open" }],
|
|
298
|
+
["AndroidDevice.scroll", { title: "Scroll" }],
|
|
299
|
+
["AndroidDevice.swipe", { title: "Swipe" }],
|
|
300
|
+
["AndroidDevice.info", { internal: true }],
|
|
301
|
+
["AndroidDevice.screenshot", { title: "Screenshot" }],
|
|
302
|
+
["AndroidDevice.inputType", { title: "Type" }],
|
|
303
|
+
["AndroidDevice.inputPress", { title: "Press" }],
|
|
304
|
+
["AndroidDevice.inputTap", { title: "Tap" }],
|
|
305
|
+
["AndroidDevice.inputSwipe", { title: "Swipe" }],
|
|
306
|
+
["AndroidDevice.inputDrag", { title: "Drag" }],
|
|
307
|
+
["AndroidDevice.launchBrowser", { title: "Launch browser" }],
|
|
308
|
+
["AndroidDevice.open", { title: "Open app" }],
|
|
309
|
+
["AndroidDevice.shell", { internal: true }],
|
|
310
|
+
["AndroidDevice.installApk", { title: "Install apk" }],
|
|
311
|
+
["AndroidDevice.push", { title: "Push" }],
|
|
312
|
+
["AndroidDevice.connectToWebView", { internal: true }],
|
|
313
|
+
["AndroidDevice.close", { internal: true }],
|
|
314
|
+
["JsonPipe.send", { internal: true }],
|
|
315
|
+
["JsonPipe.close", { internal: true }]
|
|
316
|
+
]);
|
|
317
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
318
|
+
0 && (module.exports = {
|
|
319
|
+
methodMetainfo
|
|
320
|
+
});
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var utilityScriptSerializers_exports = {};
|
|
20
|
+
__export(utilityScriptSerializers_exports, {
|
|
21
|
+
parseEvaluationResultValue: () => parseEvaluationResultValue,
|
|
22
|
+
serializeAsCallArgument: () => serializeAsCallArgument
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utilityScriptSerializers_exports);
|
|
25
|
+
function isRegExp(obj) {
|
|
26
|
+
try {
|
|
27
|
+
return obj instanceof RegExp || Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
28
|
+
} catch (error) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function isDate(obj) {
|
|
33
|
+
try {
|
|
34
|
+
return obj instanceof Date || Object.prototype.toString.call(obj) === "[object Date]";
|
|
35
|
+
} catch (error) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function isURL(obj) {
|
|
40
|
+
try {
|
|
41
|
+
return obj instanceof URL || Object.prototype.toString.call(obj) === "[object URL]";
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function isError(obj) {
|
|
47
|
+
try {
|
|
48
|
+
return obj instanceof Error || obj && Object.getPrototypeOf(obj)?.name === "Error";
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function isTypedArray(obj, constructor) {
|
|
54
|
+
try {
|
|
55
|
+
return obj instanceof constructor || Object.prototype.toString.call(obj) === `[object ${constructor.name}]`;
|
|
56
|
+
} catch (error) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const typedArrayConstructors = {
|
|
61
|
+
i8: Int8Array,
|
|
62
|
+
ui8: Uint8Array,
|
|
63
|
+
ui8c: Uint8ClampedArray,
|
|
64
|
+
i16: Int16Array,
|
|
65
|
+
ui16: Uint16Array,
|
|
66
|
+
i32: Int32Array,
|
|
67
|
+
ui32: Uint32Array,
|
|
68
|
+
// TODO: add Float16Array once it's in baseline
|
|
69
|
+
f32: Float32Array,
|
|
70
|
+
f64: Float64Array,
|
|
71
|
+
bi64: BigInt64Array,
|
|
72
|
+
bui64: BigUint64Array
|
|
73
|
+
};
|
|
74
|
+
function typedArrayToBase64(array) {
|
|
75
|
+
if ("toBase64" in array)
|
|
76
|
+
return array.toBase64();
|
|
77
|
+
const binary = Array.from(new Uint8Array(array.buffer, array.byteOffset, array.byteLength)).map((b) => String.fromCharCode(b)).join("");
|
|
78
|
+
return btoa(binary);
|
|
79
|
+
}
|
|
80
|
+
function base64ToTypedArray(base64, TypedArrayConstructor) {
|
|
81
|
+
const binary = atob(base64);
|
|
82
|
+
const bytes = new Uint8Array(binary.length);
|
|
83
|
+
for (let i = 0; i < binary.length; i++)
|
|
84
|
+
bytes[i] = binary.charCodeAt(i);
|
|
85
|
+
return new TypedArrayConstructor(bytes.buffer);
|
|
86
|
+
}
|
|
87
|
+
function parseEvaluationResultValue(value, handles = [], refs = /* @__PURE__ */ new Map()) {
|
|
88
|
+
if (Object.is(value, void 0))
|
|
89
|
+
return void 0;
|
|
90
|
+
if (typeof value === "object" && value) {
|
|
91
|
+
if ("ref" in value)
|
|
92
|
+
return refs.get(value.ref);
|
|
93
|
+
if ("v" in value) {
|
|
94
|
+
if (value.v === "undefined")
|
|
95
|
+
return void 0;
|
|
96
|
+
if (value.v === "null")
|
|
97
|
+
return null;
|
|
98
|
+
if (value.v === "NaN")
|
|
99
|
+
return NaN;
|
|
100
|
+
if (value.v === "Infinity")
|
|
101
|
+
return Infinity;
|
|
102
|
+
if (value.v === "-Infinity")
|
|
103
|
+
return -Infinity;
|
|
104
|
+
if (value.v === "-0")
|
|
105
|
+
return -0;
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
if ("d" in value) {
|
|
109
|
+
return new Date(value.d);
|
|
110
|
+
}
|
|
111
|
+
if ("u" in value)
|
|
112
|
+
return new URL(value.u);
|
|
113
|
+
if ("bi" in value)
|
|
114
|
+
return BigInt(value.bi);
|
|
115
|
+
if ("e" in value) {
|
|
116
|
+
const error = new Error(value.e.m);
|
|
117
|
+
error.name = value.e.n;
|
|
118
|
+
error.stack = value.e.s;
|
|
119
|
+
return error;
|
|
120
|
+
}
|
|
121
|
+
if ("r" in value)
|
|
122
|
+
return new RegExp(value.r.p, value.r.f);
|
|
123
|
+
if ("a" in value) {
|
|
124
|
+
const result = [];
|
|
125
|
+
refs.set(value.id, result);
|
|
126
|
+
for (const a of value.a)
|
|
127
|
+
result.push(parseEvaluationResultValue(a, handles, refs));
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
if ("o" in value) {
|
|
131
|
+
const result = {};
|
|
132
|
+
refs.set(value.id, result);
|
|
133
|
+
for (const { k, v } of value.o) {
|
|
134
|
+
if (k === "__proto__")
|
|
135
|
+
continue;
|
|
136
|
+
result[k] = parseEvaluationResultValue(v, handles, refs);
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
if ("h" in value)
|
|
141
|
+
return handles[value.h];
|
|
142
|
+
if ("ta" in value)
|
|
143
|
+
return base64ToTypedArray(value.ta.b, typedArrayConstructors[value.ta.k]);
|
|
144
|
+
}
|
|
145
|
+
return value;
|
|
146
|
+
}
|
|
147
|
+
function serializeAsCallArgument(value, handleSerializer) {
|
|
148
|
+
return serialize(value, handleSerializer, { visited: /* @__PURE__ */ new Map(), lastId: 0 });
|
|
149
|
+
}
|
|
150
|
+
function serialize(value, handleSerializer, visitorInfo) {
|
|
151
|
+
if (value && typeof value === "object") {
|
|
152
|
+
if (typeof globalThis.Window === "function" && value instanceof globalThis.Window)
|
|
153
|
+
return "ref: <Window>";
|
|
154
|
+
if (typeof globalThis.Document === "function" && value instanceof globalThis.Document)
|
|
155
|
+
return "ref: <Document>";
|
|
156
|
+
if (typeof globalThis.Node === "function" && value instanceof globalThis.Node)
|
|
157
|
+
return "ref: <Node>";
|
|
158
|
+
}
|
|
159
|
+
return innerSerialize(value, handleSerializer, visitorInfo);
|
|
160
|
+
}
|
|
161
|
+
function innerSerialize(value, handleSerializer, visitorInfo) {
|
|
162
|
+
const result = handleSerializer(value);
|
|
163
|
+
if ("fallThrough" in result)
|
|
164
|
+
value = result.fallThrough;
|
|
165
|
+
else
|
|
166
|
+
return result;
|
|
167
|
+
if (typeof value === "symbol")
|
|
168
|
+
return { v: "undefined" };
|
|
169
|
+
if (Object.is(value, void 0))
|
|
170
|
+
return { v: "undefined" };
|
|
171
|
+
if (Object.is(value, null))
|
|
172
|
+
return { v: "null" };
|
|
173
|
+
if (Object.is(value, NaN))
|
|
174
|
+
return { v: "NaN" };
|
|
175
|
+
if (Object.is(value, Infinity))
|
|
176
|
+
return { v: "Infinity" };
|
|
177
|
+
if (Object.is(value, -Infinity))
|
|
178
|
+
return { v: "-Infinity" };
|
|
179
|
+
if (Object.is(value, -0))
|
|
180
|
+
return { v: "-0" };
|
|
181
|
+
if (typeof value === "boolean")
|
|
182
|
+
return value;
|
|
183
|
+
if (typeof value === "number")
|
|
184
|
+
return value;
|
|
185
|
+
if (typeof value === "string")
|
|
186
|
+
return value;
|
|
187
|
+
if (typeof value === "bigint")
|
|
188
|
+
return { bi: value.toString() };
|
|
189
|
+
if (isError(value)) {
|
|
190
|
+
let stack;
|
|
191
|
+
if (value.stack?.startsWith(value.name + ": " + value.message)) {
|
|
192
|
+
stack = value.stack;
|
|
193
|
+
} else {
|
|
194
|
+
stack = `${value.name}: ${value.message}
|
|
195
|
+
${value.stack}`;
|
|
196
|
+
}
|
|
197
|
+
return { e: { n: value.name, m: value.message, s: stack } };
|
|
198
|
+
}
|
|
199
|
+
if (isDate(value))
|
|
200
|
+
return { d: value.toJSON() };
|
|
201
|
+
if (isURL(value))
|
|
202
|
+
return { u: value.toJSON() };
|
|
203
|
+
if (isRegExp(value))
|
|
204
|
+
return { r: { p: value.source, f: value.flags } };
|
|
205
|
+
for (const [k, ctor] of Object.entries(typedArrayConstructors)) {
|
|
206
|
+
if (isTypedArray(value, ctor))
|
|
207
|
+
return { ta: { b: typedArrayToBase64(value), k } };
|
|
208
|
+
}
|
|
209
|
+
const id = visitorInfo.visited.get(value);
|
|
210
|
+
if (id)
|
|
211
|
+
return { ref: id };
|
|
212
|
+
if (Array.isArray(value)) {
|
|
213
|
+
const a = [];
|
|
214
|
+
const id2 = ++visitorInfo.lastId;
|
|
215
|
+
visitorInfo.visited.set(value, id2);
|
|
216
|
+
for (let i = 0; i < value.length; ++i)
|
|
217
|
+
a.push(serialize(value[i], handleSerializer, visitorInfo));
|
|
218
|
+
return { a, id: id2 };
|
|
219
|
+
}
|
|
220
|
+
if (typeof value === "object") {
|
|
221
|
+
const o = [];
|
|
222
|
+
const id2 = ++visitorInfo.lastId;
|
|
223
|
+
visitorInfo.visited.set(value, id2);
|
|
224
|
+
for (const name of Object.keys(value)) {
|
|
225
|
+
let item;
|
|
226
|
+
try {
|
|
227
|
+
item = value[name];
|
|
228
|
+
} catch (e) {
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (name === "toJSON" && typeof item === "function")
|
|
232
|
+
o.push({ k: name, v: { o: [], id: 0 } });
|
|
233
|
+
else
|
|
234
|
+
o.push({ k: name, v: serialize(item, handleSerializer, visitorInfo) });
|
|
235
|
+
}
|
|
236
|
+
let jsonWrapper;
|
|
237
|
+
try {
|
|
238
|
+
if (o.length === 0 && value.toJSON && typeof value.toJSON === "function")
|
|
239
|
+
jsonWrapper = { value: value.toJSON() };
|
|
240
|
+
} catch (e) {
|
|
241
|
+
}
|
|
242
|
+
if (jsonWrapper)
|
|
243
|
+
return innerSerialize(jsonWrapper.value, handleSerializer, visitorInfo);
|
|
244
|
+
return { o, id: id2 };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
248
|
+
0 && (module.exports = {
|
|
249
|
+
parseEvaluationResultValue,
|
|
250
|
+
serializeAsCallArgument
|
|
251
|
+
});
|