automation_model 1.0.37 → 1.0.39

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/auto_page.js CHANGED
@@ -3,7 +3,7 @@ import { getContext } from "./init_browser.js";
3
3
  let context = null;
4
4
  const navigate = async (path = "") => {
5
5
  //console.log("navigate", this.context.environment.baseUrl + this.path);
6
- await context.stable.goto(context.environment.baseUrl + path);
6
+ await context.stable.goto(new URL(path, context.environment.baseUrl).href);
7
7
  await context.stable.waitForPageLoad();
8
8
  };
9
9
 
@@ -165,7 +165,7 @@ class StableBrowser {
165
165
  }
166
166
  }
167
167
 
168
- async fill(selector, value, _params = null, options = {}) {
168
+ async fill(selector, value, enter = false, _params = null, options = {}) {
169
169
  const info = {};
170
170
  info.log = [];
171
171
  info.operation = "fill";
@@ -176,6 +176,9 @@ class StableBrowser {
176
176
  await this._screenShot(options);
177
177
  await element.fill(value, { timeout: 10000 });
178
178
  await element.dispatchEvent("change");
179
+ if (enter) {
180
+ await this.page.keyboard.press("Enter");
181
+ }
179
182
  await this.waitForPageLoad();
180
183
  return info;
181
184
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automation_model",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
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",