Which Selenium WebDriver locator is faster?

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…

--

--

--

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Playbook: How to manage dependencies

Switchboard V2 is LIVE!

Your own Docker registry with Kubernetes and Rancher

Screen recording 1 frame per second in 720P using FFmpeg

Enterprise DevOps Platform Addresses End-to-End Pipeline Pain-Points

Top Business Advantages of The Microsoft Azure Cloud

Java Data Struc. Cheat Sheet — Queues

Understanding & Detecting C2 Frameworks — DarkFinger-C2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zhimin Zhan

Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

More from Medium

Why Test Automation Tool with Runtime License is Evil?

Selenideium Element Inspector v1.2 has been released

Waiting for a custom condition in Selenium or Appium

All The Selenium Locators For Automation