We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e611b5 commit 3e105c7Copy full SHA for 3e105c7
lib/core/utils/dq-element.js
@@ -24,7 +24,7 @@ function getFullPathSelector(elm) {
24
const element = elm;
25
const names = [];
26
while (elm.parentElement && elm.nodeName !== 'BODY') {
27
- if(sourceCache.has(elm)) {
+ if (sourceCache.has(elm)) {
28
names.unshift(sourceCache.get(elm));
29
break;
30
} else if (elm.id) {
@@ -33,7 +33,9 @@ function getFullPathSelector(elm) {
33
} else {
34
let c = 1,
35
e = elm;
36
- for (; e.previousElementSibling; e = e.previousElementSibling, c++) {}
+ for (; e.previousElementSibling; e = e.previousElementSibling, c++) {
37
+ // Increment counter for each previous sibling
38
+ }
39
names.unshift(elm.nodeName + ':nth-child(' + c + ')');
40
}
41
elm = elm.parentElement;
0 commit comments