automation_model 1.0.45 → 1.0.46
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/bin/stable_browser.js +3 -1
- package/package.json +1 -1
package/bin/stable_browser.js
CHANGED
|
@@ -249,8 +249,9 @@ class StableBrowser {
|
|
|
249
249
|
info.selector = selector;
|
|
250
250
|
info.value = text;
|
|
251
251
|
info.pattern = pattern;
|
|
252
|
+
let foundText = null;
|
|
252
253
|
try {
|
|
253
|
-
|
|
254
|
+
foundText = await this.getText(selector, _params, options, info);
|
|
254
255
|
let escapedText = text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
255
256
|
pattern = pattern.replace("{text}", escapedText);
|
|
256
257
|
let regex = new RegExp(pattern);
|
|
@@ -261,6 +262,7 @@ class StableBrowser {
|
|
|
261
262
|
return info;
|
|
262
263
|
} catch (e) {
|
|
263
264
|
this.logger.error("verify element contains text failed " + JSON.stringify(info));
|
|
265
|
+
this.logger.error("found text " + foundText + " pattern " + pattern);
|
|
264
266
|
Object.assign(e, { info: info });
|
|
265
267
|
await this._screenShot(options);
|
|
266
268
|
throw e;
|