@skyramp/skyramp 1.2.39 → 1.2.40
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/package.json
CHANGED
|
@@ -272,6 +272,13 @@ class SkyrampPlaywrightLocator {
|
|
|
272
272
|
newMsg += this.generateLLMErrors();
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
// Ensure error is an Error object, not a string
|
|
276
|
+
if (typeof error === 'string') {
|
|
277
|
+
error = new Error(error);
|
|
278
|
+
} else if (!(error instanceof Error)) {
|
|
279
|
+
error = new Error(String(error));
|
|
280
|
+
}
|
|
281
|
+
|
|
275
282
|
error.message = error.message + "\n" + newMsg
|
|
276
283
|
|
|
277
284
|
return error
|
|
@@ -279,7 +286,7 @@ class SkyrampPlaywrightLocator {
|
|
|
279
286
|
|
|
280
287
|
hydrationErrorMsg = "Potentially a hydration issue. Please add enough waitForTimeout()"
|
|
281
288
|
|
|
282
|
-
|
|
289
|
+
newPrevHydrationErrorMsg() {
|
|
283
290
|
return `Cannot find locator ${this._locator} and likely a hydration issue on ${this._previousLocator._locator}.\n` +
|
|
284
291
|
`Please add enough waitForTimeout() on ${this._previoousLocator._locator}`;
|
|
285
292
|
}
|