Answers for "how do you decide which locator to use"

0

how do you decide which locator to use

- First I would check for id. If there is id,
  and it is not dynamic, I would go for id.
- If not, I would quickly check for it if 
  there is unique class or name attribute value
-If it is link, I would use linkText or
  partiallinktext
-If none available than I would go for xpath
Posted by: Guest on December-04-2020

Code answers related to "how do you decide which locator to use"

Browse Popular Code Answers by Language