automation_model 1.0.29 → 1.0.31

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.
@@ -97,7 +97,7 @@ class StableBrowser {
97
97
  }
98
98
  await new Promise((resolve) => setTimeout(resolve, 1000));
99
99
  }
100
- this.logger.info("failed to locate unique element, total elements found " + locatorsCount);
100
+ this.logger.debug("unable to locate unique element, total elements found " + locatorsCount);
101
101
  info.log.push("failed to locate unique element, total elements found " + locatorsCount);
102
102
  for (let i = 0; i < locatorsByPriority.length; i++) {
103
103
  let locators = locatorsByPriority[i];
@@ -136,7 +136,7 @@ class StableBrowser {
136
136
  }
137
137
  }
138
138
 
139
- async selectOptions(selector, values, _params = null, options = {}) {
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.selectOptions(values, { timeout: 5000 });
150
+ await element.selectOption(values, { timeout: 5000 });
151
151
  } catch (e) {
152
- info.log.push("selectOptions failed, will try force");
153
- await element.selectOptions(values, { timeout: 10000, force: true });
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("selectOptions failed " + JSON.stringify(info));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automation_model",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "An automation infrastructure module to be use for generative AI automation projects.",
5
5
  "main": "bin/index.js",
6
6
  "type": "module",