ff-dom 1.0.18-beta.3 → 1.0.18-beta.4
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/package.json +1 -1
- package/src/utils/getElementsFromHTML.ts +12 -13
package/package.json
CHANGED
|
@@ -408,19 +408,18 @@ const getElementsFromHTML = (
|
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
: "Y",
|
|
411
|
+
const xpathResults = parseDOM(targetElement, document, false, true);
|
|
412
|
+
xpathResults.forEach((result) => {
|
|
413
|
+
const fnValue = result.value;
|
|
414
|
+
record.locators.forEach((loc) => {
|
|
415
|
+
createLocator(loc, {
|
|
416
|
+
name: 'xpath',
|
|
417
|
+
value: fnValue,
|
|
418
|
+
isRecorded: loc.value === fnValue ? loc.isRecorded : 'Y',
|
|
419
|
+
isSelfHealed: loc.value === fnValue ? loc.isSelfHealed : 'Y',
|
|
420
|
+
});
|
|
422
421
|
});
|
|
423
|
-
})
|
|
422
|
+
})
|
|
424
423
|
|
|
425
424
|
for (const locator of record.locators) {
|
|
426
425
|
try {
|
|
@@ -440,7 +439,7 @@ const getElementsFromHTML = (
|
|
|
440
439
|
value: relativeXpath,
|
|
441
440
|
isRecorded:
|
|
442
441
|
locator.isRecorded !== "" &&
|
|
443
|
-
|
|
442
|
+
locator.isRecorded !== null
|
|
444
443
|
? locator.isRecorded
|
|
445
444
|
: "Y",
|
|
446
445
|
});
|