Which Selenium WebDriver locator is faster?
3 min readJan 27, 2021
--
According to this article on Medium: “Which locator is faster in identifying elements in Selenium?”, the order of Selenium Locators (fast to slow) is “ID, Name, CSS, XPath”.
Today I did a benchmark test to compare those 4 Selenium locators, I got quite different results. As we know, the time took to identify one web element is very much dependent on the page content. There are many…