Hi all,
I’m trying to execute the following script using execute_script command but the IDE throws me an error saying that “[error] Line 11: variable “V” is not defined”
I’m sure that the error is occurring due to line ‘let a = document.querySelector("#tile_${v[0]}-${v[1]} > div.panel.panel.details > div > p:nth-child(2)").innerHTML;’
The dom path of the element is dynamic and I’m using another function to get those values in an iterator but when I try to make a JS path using those values, it throws error.
Any suggestion please?
let iter = SpiralIterator([x, y])
let v
for (var i = 0; i < count; i++) {
v = iter.next().value // here iter vaule is of the form [x,y]
if (i != 0) {
let c = 0
let a = document.querySelector("#tile_${v[0]}-${v[1]} > div.panel.panel.details > div > p:nth-child(2)").innerHTML;
for (let ct of cts) {
if (a.indexOf(ct) > -1) {
c = 1
break
}
}
}
}