Member-only story
Use Chained Locator to Speed Up Selenium WebDriver Tests
How to speed up your Selenium WebDriver scripts with Chained Locators
2 min readNov 26, 2023
My father’s article “Optimize Selenium WebDriver Automated Test Scripts: Speed” is a well-received one, featured on Geek Culture. It contains some practical tips to make your Selenium tests run faster.
In this article, I will share another speed optimization tip for Selenium WebDriver tests.
Task: Locate a “queue” link on W3C WebDriver page
There are three “queue” links (with that exact text) on the W3C WebDriver page. The reason I chose this page: it is quite large, 1.8MB in size. So, the time-saving difference is more noticeable.
Please note the purpose of this exercise to solely find out potential time-saving gains using chained-locators.
Let’s see the speed differences first.