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.
@@ -188,12 +188,11 @@ class StableBrowser {
188
188
  throw e;
189
189
  }
190
190
  }
191
- // async _getText(selector, _params = null, options = {}, info = {}) {
192
- // let element = await this._locate(selector, info, _params);
193
- // await this._screenShot(options);
194
- // return await element.textContent();
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._getText2(selector, _params, options, info);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automation_model",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
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",