Using Selenium for Excel, I need to loop through each table in the webpage to extract each table. There are usually 7 to 10 tables on the page.
The current code I have extracts the first table, nine time's over (based on count). How can I extract each table once?
Dim bot As New ChromeDriver, tbl As Selenium.TableElement, LRow As Long
Const sURL As String = "https://www.racingandsports.com/form-guide/thoroughbred/australia/sale/2021-10-06/race-tips"
With bot
.Get sURL
Set tbl = .FindElementById("rank_table").AsTable
r = .FindElementsById("rank_table").Count
For i = 1 To r
Sheets("Import").Select
LRow = Cells(Rows.Count, 1).End(xlUp).Row
tbl.ToExcel ThisWorkbook.Sheets("Import").Range("A" & LRow + 2)
Next i
End With