@dev-blinq/cucumber_client 1.0.1226-dev → 1.0.1228-dev
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.
|
@@ -459,7 +459,7 @@ class BVTRecorder {
|
|
|
459
459
|
getAction: (e) => {
|
|
460
460
|
consumeEvent(e);
|
|
461
461
|
},
|
|
462
|
-
getInterestedElement: () => {
|
|
462
|
+
getInterestedElement: () => {},
|
|
463
463
|
hoverOutlineStyle: "",
|
|
464
464
|
});
|
|
465
465
|
|
|
@@ -474,7 +474,7 @@ class BVTRecorder {
|
|
|
474
474
|
};
|
|
475
475
|
},
|
|
476
476
|
getAction: () => null,
|
|
477
|
-
getInterestedElement: () => {
|
|
477
|
+
getInterestedElement: () => {},
|
|
478
478
|
hoverOutlineStyle: "",
|
|
479
479
|
});
|
|
480
480
|
|
|
@@ -489,7 +489,7 @@ class BVTRecorder {
|
|
|
489
489
|
};
|
|
490
490
|
},
|
|
491
491
|
getAction: () => null,
|
|
492
|
-
getInterestedElement: () => {
|
|
492
|
+
getInterestedElement: () => {},
|
|
493
493
|
hoverOutlineStyle: "",
|
|
494
494
|
});
|
|
495
495
|
|
|
@@ -933,6 +933,11 @@ class BVTRecorder {
|
|
|
933
933
|
}
|
|
934
934
|
const role = window.getAriaRole(el);
|
|
935
935
|
const label = window.getElementAccessibleName(el, false) || window.getElementAccessibleName(el, true) || role || "";
|
|
936
|
+
const attrs2 = {};
|
|
937
|
+
for (var att, i = 0, atts = el.attributes, n = atts.length; i < n; i++) {
|
|
938
|
+
const att = atts[i];
|
|
939
|
+
attrs2[att.nodeName] = att.nodeValue;
|
|
940
|
+
}
|
|
936
941
|
return {
|
|
937
942
|
role,
|
|
938
943
|
label,
|
|
@@ -956,6 +961,7 @@ class BVTRecorder {
|
|
|
956
961
|
checked: el.checked,
|
|
957
962
|
innerText: el.innerText,
|
|
958
963
|
},
|
|
964
|
+
allAttributes: attrs2,
|
|
959
965
|
};
|
|
960
966
|
}
|
|
961
967
|
handleEvent(e) {
|
|
@@ -16,6 +16,7 @@ import chokidar from "chokidar";
|
|
|
16
16
|
import logger from "../../logger.js";
|
|
17
17
|
import { unEscapeNonPrintables } from "../cucumber/utils.js";
|
|
18
18
|
import { findAvailablePort } from "../utils/index.js";
|
|
19
|
+
import { getAiConfig } from "../code_gen/page_reflection.js";
|
|
19
20
|
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
20
21
|
const { source: injectedScriptSource } = pkg;
|
|
21
22
|
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -491,8 +492,14 @@ export class BVTRecorder {
|
|
|
491
492
|
if (!transition) return;
|
|
492
493
|
// console.log("transitionType", transition.transitionType);
|
|
493
494
|
if (this.userInitiatedTranistionTypes.includes(transition.transitionType)) {
|
|
495
|
+
const env = JSON.parse(readFileSync(this.envName), "utf8");
|
|
496
|
+
const baseUrl = env.baseUrl;
|
|
497
|
+
let url = transition.userTypedURL;
|
|
498
|
+
if (baseUrl && url.startsWith(baseUrl)) {
|
|
499
|
+
url = url.replace(baseUrl, "{{env.baseUrl}}");
|
|
500
|
+
}
|
|
494
501
|
// console.log("User initiated transition");
|
|
495
|
-
this.sendEvent(this.events.onGoto, { url
|
|
502
|
+
this.sendEvent(this.events.onGoto, { url });
|
|
496
503
|
}
|
|
497
504
|
}
|
|
498
505
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-blinq/cucumber_client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1228-dev",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@babel/traverse": "^7.27.1",
|
|
27
27
|
"@babel/types": "^7.27.1",
|
|
28
28
|
"@cucumber/tag-expressions": "^6.1.1",
|
|
29
|
-
"@dev-blinq/cucumber-js": "1.0.
|
|
29
|
+
"@dev-blinq/cucumber-js": "1.0.173-dev",
|
|
30
30
|
"@faker-js/faker": "^8.1.0",
|
|
31
31
|
"automation_model": "1.0.737-dev",
|
|
32
32
|
"axios": "^1.7.4",
|