As kodingkuma told you, a faster way it's to use JavaScriptExecutor
But it depend also from the structure of the webPage.
I think a good approach could be:
Search on 'google' whats the fastest way to find WebElements (googling 'selenium fastest way find element' you will find dozens of examples).
I.E. some results:
Which is the best and fastest way to find the element using webdriver? By.XPath or By.ID or anything else? And why? [closed]
What is the fastest and slowest ways of finding elements using Selenium Webdriver?
Which is the Best and Fastest Way to Find Elements Using Selenium WebDriver
And then, build some different Procedures and measure the time needed to be loaded.
(In my opinion a good mode to find the elements it's initially check if the elements that you need are listed ('li') in a list ('ul' or 'ol'), and if is possible, instantiate a list(Of IWebElements); and then loop every WebElement inside it)
Here an example:
Dim jsExec As OpenQA.Selenium.IJavaScriptExecutor
jsExec = CType(driver, OpenQA.Selenium.IJavaScriptExecutor)
Dim sw As New Stopwatch
Dim MyListOfWebElements As System.Collections.ObjectModel.ReadOnlyCollection(Of IWebElement)
Public Sub Selenium_Load_WebElements_By_JsExecutor()
sw.Restart()
MyListOfWebElements = jsExec.ExecuteScript("var result = document.querySelector('...here you put your css selector...'); if(result === null) {} else {result = result.querySelectorAll('li')}; return result;")
sw.Stop()
MsgBox("WebElement List (jsExec-css) - Loading time (ms): " & sw.ElapsedMilliseconds)
End Sub
Public Sub Selenium_Load_WebElements_By_Css()
sw.Restart()
MyListOfWebElements = Driver.driver.FindElements(By.CssSelector("...your css selector...")).ToList
sw.Stop()
MsgBox("WebElement List (Css) - Loading time (ms): " & sw.ElapsedMilliseconds)
End Sub
Public Sub Selenium_Load_WebElements_By_Id()
sw.Restart()
MyListOfWebElements = Driver.driver.FindElements(By.Id("...your id...")).ToList
sw.Stop()
MsgBox("WebElement List (Id) - Loading time (ms): " & sw.ElapsedMilliseconds)
End Sub
P.S. Note that to use javaScriptExecutor, you need to use Javascript Syntax, between '...'.