Im trying to figure out how works the following-sibling navigation through elements, actually, Im practicing on try to get the name, product code, stock and the daily USD value and it works perfectly, it goes through the items and get differents info of each one, but I can't reach the price section, I think is inside another square on the div elements.
So the question is, how I can navigate to reach that field?, It needs to be following-sibling way because is the only method that worked to get the different information of each item.
Is there a way to say following-sibling::/div/div/span/h1 something like that, to navigate inside?
Here is the part of my newbie code and some images of examples:
Link: https://www.tecnoglobal.cl/tiendaonline/webapp/computadores/computador-desktop/239
i = 2
Set mysheet = Sheets("Hoja1")
Set products = driver.FindElementsByXPath(".//h1[@class='minificha__nombre-producto']")
For Each product In products
If product.FindElementByXPath("following-sibling::span").Text <> "" Then
Workbooks.Open (Tecnogfile)
mysheet.Cells(i, 1).Value = product.FindElementByXPath("following-sibling::span").Text
mysheet.Cells(i, 2).Value = product.FindElementByXPath("self::h1").Text
mysheet.Cells(i, 3).Value = product.FindElementByXPath("following-sibling::div").Text
mysheet.Cells(i, 5).Value = product.FindElementByXPath("//div//following-sibling::div").Text
e = 2
Set precios = driver.FindElementsByXPath(".//div[@class='minificha__precio-preferencial minificha__precio-preferencial--solo ng-binding ng-scope']")
For Each precio In precios
mysheet.Cells(i, 4).Value = precio.FindElementByXPath("previous::span").Text
Next
e = e + 1