0 votes
in Selenium by
When you use these locators ID, Name, XPath, Or CSS Selector?

1 Answer

0 votes
by

ID & Name locators will be used when there are unique identifiers & unique names available on the web page.

CSS Selector can be used for performance and when ID & Name locators are not unique.

XPath is used when there is no preferred locators.

Related questions

0 votes
0 votes
asked Jan 5 in Selenium by rajeshsharma
0 votes
asked Feb 7, 2020 in JAVA by rajeshsharma
...