I am trying to extract some values using VBA from a Website
The following code contains the array of the data I am looking for. This works perfectly and gives me the array of the data I am looking for.
document.getElementsByClassName("list-flights")(0).querySelectorAll("[class$='price']")
The result for the above is
<NodeList length="23">...</NodeList>
But when I am trying to extract the values by running the loop in a VBA by using the following code
lnth = document.getElementsByClassName("list-flights")(0).querySelectorAll("[class$='price']").Length - 1
For x = 0 To lnth
firstResult = document.getElementsByClassName("list-flights")(0).querySelectorAll("[class$='price']")(x).innerText
Next x
The code would give error at firstResult since it would not get any value. I checked on Internet Explorer there is no value if I use "(" brackets,however if I use "[" on Internet Explorer it works but VBA would not accept "[" Brackets.
document.getElementsByClassName("list-flights")(0).querySelectorAll("[class$='price']")[0]
The code above works on Internet Explorer Console but cant be used in VBA.
I am sure I am missing something would be of great help if you can advice what is the workaround on this.
