@dev-blinq/cucumber_client 1.0.1475-stage → 1.0.1476-stage
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.
|
@@ -41,7 +41,7 @@ async function evaluate(frame, script) {
|
|
|
41
41
|
await evaluate(childFrame, script);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
async function findNestedFrameSelector(frame, obj
|
|
44
|
+
async function findNestedFrameSelector(frame, obj) {
|
|
45
45
|
try {
|
|
46
46
|
const parent = frame.parentFrame();
|
|
47
47
|
if (!parent)
|
|
@@ -49,10 +49,10 @@ async function findNestedFrameSelector(frame, obj = {}) {
|
|
|
49
49
|
const frameElement = await frame.frameElement();
|
|
50
50
|
if (!frameElement)
|
|
51
51
|
return;
|
|
52
|
-
const selectors = await
|
|
52
|
+
const selectors = await parent.evaluate((element) => {
|
|
53
53
|
const recorder = window.__bvt_Recorder;
|
|
54
54
|
return recorder.locatorGenerator.getElementLocators(element, { excludeText: true }).locators;
|
|
55
|
-
});
|
|
55
|
+
}, frameElement);
|
|
56
56
|
return findNestedFrameSelector(parent, { children: obj, selectors });
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
@@ -775,11 +775,11 @@ export class BVTRecorder {
|
|
|
775
775
|
const contextElement = document.querySelector(`[data-blinq-context-id="${contextId}"]`);
|
|
776
776
|
const el = document.querySelector(`[data-blinq-id="${id}"]`);
|
|
777
777
|
if (!recorder || !el) {
|
|
778
|
-
return { locators: []
|
|
778
|
+
return { locators: [] };
|
|
779
779
|
}
|
|
780
780
|
if (contextElement && recorder.locatorGenerator.toContextLocators) {
|
|
781
781
|
const result = recorder.locatorGenerator.toContextLocators(el, contextElement);
|
|
782
|
-
return result ?? { locators: []
|
|
782
|
+
return result ?? { locators: [] };
|
|
783
783
|
}
|
|
784
784
|
const isRecordingText = mode === "recordingText";
|
|
785
785
|
return recorder.locatorGenerator.getElementLocators(el, {
|