playwright-core 1.56.0-alpha-1756945786000 → 1.56.0-alpha-1757023974000
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/generated/injectedScriptSource.js +1 -1
- package/lib/protocol/validator.js +1 -0
- package/lib/server/frames.js +11 -4
- package/lib/server/recorder/chat.js +2 -2
- package/lib/utilsBundleImpl/index.js +6 -6
- package/lib/vite/htmlReport/index.html +16 -16
- package/lib/vite/recorder/assets/codeMirrorModule-B99R0BS5.js +24 -0
- package/lib/vite/recorder/assets/{index-DkjY5ngq.js → index-DhBvyf_c.js} +5 -5
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-DGbxHDST.js +24 -0
- package/lib/vite/traceViewer/assets/{defaultSettingsView-XM8laJv9.js → defaultSettingsView-O-FwlkAx.js} +42 -42
- package/lib/vite/traceViewer/assets/xtermModule-EuEc8Siv.js +9 -0
- package/lib/vite/traceViewer/{index.BdwOsQ8G.js → index.DRGQ-a-u.js} +1 -1
- package/lib/vite/traceViewer/index.html +2 -2
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/{uiMode.4-JSyiIq.js → uiMode.Dzulv6q5.js} +2 -2
- package/lib/vite/traceViewer/uiMode.html +2 -2
- package/package.json +1 -1
- package/lib/vite/recorder/assets/codeMirrorModule-DqBTjC9Y.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-CgiWi6RU.js +0 -24
- package/lib/vite/traceViewer/assets/xtermModule-BoAIEibi.js +0 -9
|
@@ -1928,6 +1928,7 @@ import_validatorPrimitives.scheme.FrameExpectResult = (0, import_validatorPrimit
|
|
|
1928
1928
|
matches: import_validatorPrimitives.tBoolean,
|
|
1929
1929
|
received: (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tType)("SerializedValue")),
|
|
1930
1930
|
timedOut: (0, import_validatorPrimitives.tOptional)(import_validatorPrimitives.tBoolean),
|
|
1931
|
+
errorMessage: (0, import_validatorPrimitives.tOptional)(import_validatorPrimitives.tString),
|
|
1931
1932
|
log: (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tArray)(import_validatorPrimitives.tString))
|
|
1932
1933
|
});
|
|
1933
1934
|
import_validatorPrimitives.scheme.WorkerInitializer = (0, import_validatorPrimitives.tObject)({
|
package/lib/server/frames.js
CHANGED
|
@@ -1160,11 +1160,15 @@ class Frame extends import_instrumentation.SdkObject {
|
|
|
1160
1160
|
fixupMetadataError(result);
|
|
1161
1161
|
return result;
|
|
1162
1162
|
} catch (e) {
|
|
1163
|
-
if (js.isJavaScriptErrorInEvaluate(e) || (0, import_selectorParser.isInvalidSelectorError)(e))
|
|
1164
|
-
throw e;
|
|
1165
1163
|
const result = { matches: options.isNot, log: (0, import_callLog.compressCallLog)(progress.metadata.log) };
|
|
1166
|
-
if (
|
|
1164
|
+
if ((0, import_selectorParser.isInvalidSelectorError)(e)) {
|
|
1165
|
+
result.errorMessage = "Error: " + e.message;
|
|
1166
|
+
} else if (js.isJavaScriptErrorInEvaluate(e)) {
|
|
1167
|
+
result.errorMessage = e.message;
|
|
1168
|
+
} else if (lastIntermediateResult.isSet) {
|
|
1167
1169
|
result.received = lastIntermediateResult.received;
|
|
1170
|
+
result.errorMessage = lastIntermediateResult.errorMessage;
|
|
1171
|
+
}
|
|
1168
1172
|
if (e instanceof import_errors.TimeoutError)
|
|
1169
1173
|
result.timedOut = true;
|
|
1170
1174
|
fixupMetadataError(result);
|
|
@@ -1195,7 +1199,10 @@ class Frame extends import_instrumentation.SdkObject {
|
|
|
1195
1199
|
if (log)
|
|
1196
1200
|
progress.log(log);
|
|
1197
1201
|
if (matches === options.isNot) {
|
|
1198
|
-
|
|
1202
|
+
if (missingReceived)
|
|
1203
|
+
lastIntermediateResult.errorMessage = "Error: element(s) not found";
|
|
1204
|
+
else
|
|
1205
|
+
lastIntermediateResult.received = received;
|
|
1199
1206
|
lastIntermediateResult.isSet = true;
|
|
1200
1207
|
if (!missingReceived && !Array.isArray(received))
|
|
1201
1208
|
progress.log(` unexpected value "${renderUnexpectedValue(options.expression, received)}"`);
|
|
@@ -85,7 +85,7 @@ async function asString(stream) {
|
|
|
85
85
|
function iterablePump() {
|
|
86
86
|
let controller;
|
|
87
87
|
const stream = new ReadableStream({ start: (c) => controller = c });
|
|
88
|
-
const iterable = async function* () {
|
|
88
|
+
const iterable = (async function* () {
|
|
89
89
|
const reader = stream.getReader();
|
|
90
90
|
while (true) {
|
|
91
91
|
const { done, value } = await reader.read();
|
|
@@ -93,7 +93,7 @@ function iterablePump() {
|
|
|
93
93
|
break;
|
|
94
94
|
yield value;
|
|
95
95
|
}
|
|
96
|
-
}();
|
|
96
|
+
})();
|
|
97
97
|
return {
|
|
98
98
|
iterable,
|
|
99
99
|
addChunk: (chunk) => {
|