Selenium 4 Relative Locator Examples

This article is included in my “How to in Selenium WebDriver” series.

Relative locators, introduced in Selenium 4, provide a new way to find element(s) based on the position of another element. There are five locators:

  • left

--

--

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

1K Followers

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