automation_model 1.0.29 → 1.0.30
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 +5 -5
- package/package.json +1 -1
package/bin/stable_browser.js
CHANGED
|
@@ -136,7 +136,7 @@ class StableBrowser {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
async
|
|
139
|
+
async selectOption(selector, values, _params = null, options = {}) {
|
|
140
140
|
const info = {};
|
|
141
141
|
info.log = [];
|
|
142
142
|
info.operation = "selectOptions";
|
|
@@ -147,14 +147,14 @@ class StableBrowser {
|
|
|
147
147
|
|
|
148
148
|
await this._screenShot(options);
|
|
149
149
|
try {
|
|
150
|
-
await element.
|
|
150
|
+
await element.selectOption(values, { timeout: 5000 });
|
|
151
151
|
} catch (e) {
|
|
152
|
-
info.log.push("
|
|
153
|
-
await element.
|
|
152
|
+
info.log.push("selectOption failed, will try force");
|
|
153
|
+
await element.selectOption(values, { timeout: 10000, force: true });
|
|
154
154
|
}
|
|
155
155
|
return info;
|
|
156
156
|
} catch (e) {
|
|
157
|
-
this.logger.error("
|
|
157
|
+
this.logger.error("selectOption failed " + JSON.stringify(info));
|
|
158
158
|
Object.assign(e, { info: info });
|
|
159
159
|
await this._screenShot(options);
|
|
160
160
|
throw e;
|