Technical Problem Cluster First Answered On
December 4, 2020
Contributions From The Grepper Developer Community
--> How do you decide which locator to use? Which one is the most important locator? #1-> If it is a link, I would go for linkText. #2-> If there is id, I will use id value to locate (after making sure it is not dynamic) #3-> If there is class, I'll quickly check if it is unique or not? #4-> If none of the others are not working, then I would create my custom locator with XPATH (or cssSelector)
Contributed on Dec 04 2020
1,188 Answers Avg Quality 5/10
Search Code Snippets
Plans & Pricing
Adding a Code Snippet
Viewing & Copying Snippets
Register to vote on and add code examples. Join our developer community to improve your dev skills and code like a boss!
Help us improve our code examples by registering to vote on and add answers. Join our developer community to improve your dev skills and code like a boss!
Continue with Google
By continuing, I agree that I have read and agree to Greppers's
Terms of Service