Answers for "how to choose locator in selenium"

2

locators in selenium

- There are 8 locators.
    - id, class, name, linktext, partialLinktext,
      cssSelector, xpath, tagName
      
 - 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
1

types of locators in selenium

--> WHAT ARE LOCATORS? 
    - Locators are methods that are used to locate HTML web elements for 
      Selenium browser driver.
      
--> WHAT IT IS USED FOR? 
    - It is used to locate any specific web element 
    on the UI of AUT (application under test)

--> HOW MANY Selenium LOCATORS?
   - There are 8 locators.
    - id, class, name, linktext, partialLinktext, cssSelector, xpath, tagName
Posted by: Guest on December-04-2020
0

how to choose locator in selenium

- 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 to choose locator in selenium"

Browse Popular Code Answers by Language