Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (47.6k points)

 What is the most reliable locator in Selenium WebDriver?

1 Answer

0 votes
by (106k points)

Below is the list of locators which is being used in Selenium:-

image

The one thing which is common with all the locators except By Xpath is that they do not identify an element uniquely all the time, there can be some instances where you might have two matches using the same locator and therefore By Xpath becomes the ideal choice. One thing which is always advisable is to use custom Xpath because more often than not they will always identify the element uniquely. If you want to learn Selenium then you can have a look at the following Selenium training Course. I am also mentioning a video tutorial which you must watch to learn more about it.

Browse Categories

...