in Selenium by
Q:
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.

Click here to read more about Selenium
Click here to read more about Insurance

Related questions

0 votes
0 votes
asked Jan 30, 2020 in Selenium by rajeshsharma
0 votes
asked Jan 30, 2020 in Selenium by Deepanshu Burreja
0 votes
asked Aug 19, 2019 in Selenium by rahulsharma
0 votes
asked Apr 20, 2020 in JIRA by rajeshsharma
0 votes
asked Feb 6, 2020 in JavaScript by rajeshsharma
...