automation_model 1.0.41 → 1.0.42
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 +6 -7
- package/package.json +1 -1
package/bin/stable_browser.js
CHANGED
|
@@ -188,12 +188,11 @@ class StableBrowser {
|
|
|
188
188
|
throw e;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
async _getText2(selector, _params = null, options = {}, info = {}) {
|
|
191
|
+
|
|
192
|
+
async getText(selector, _params = null, options = {}, info = {}) {
|
|
193
|
+
if (!info.log) {
|
|
194
|
+
info.log = [];
|
|
195
|
+
}
|
|
197
196
|
let element = await this._locate(selector, info, _params);
|
|
198
197
|
await this._screenShot(options);
|
|
199
198
|
let textFound = await element.evaluate((_node) => {
|
|
@@ -250,7 +249,7 @@ class StableBrowser {
|
|
|
250
249
|
info.selector = selector;
|
|
251
250
|
info.value = text;
|
|
252
251
|
try {
|
|
253
|
-
let foundText = await this.
|
|
252
|
+
let foundText = await this.getText(selector, _params, options, info);
|
|
254
253
|
if (!foundText.includes(text)) {
|
|
255
254
|
info.foundText = foundText;
|
|
256
255
|
throw new Error("element doesn't contain text " + text);
|