I am struggling with a web page on a secure website. I will put a snapshot of what I am working on. The XPATH that has the rows of a table (equals to 13 rows) is that
//div[@id='Section3']
But the data is not inside that XPATH but after it in 9 columns.
How can I refer to those children or ancestors ( I don’t know the exact term)?
Here’s the HTML for that page ( I couldn’t include it in the question)
Here’s the snapshot (may clarify the issue well)
How to implement the variable j in such lines?
Dim x As Long, i As Long, j As Long
x = .FindElementsByXPath("//div[@id='Section3']")
For i = 1 To x
For j = 1 To 9
Cells(i, j).Value = .FindElementByXPath("//div[@id='Section3']/following-sibling::div[following-sibling::div[@id='Section3'][count(preceding-sibling::div[@id='Section3'])=" & i & " and count(following-sibling::div[@id='Section3'])=" & x - (i + 1) & "]][" & j & "]").Text
Next j
Next I