Selenium Flashcards
1
Q
What are the different types of locators in Selenium?
A
Locators are Selenium methods that are used to locate certain web elements
o Link Text -> it can be used only with links, so anchor tags
o Partial Link Text -> it can be used only with links, so anchor tags
o Id -> it is always unique and most preferred locator if available
o Name
o Tag Name
o Class Name
o XPath -> one of the mostly used locators after id
o CSS Selector -> one of the mostly used locators after id. It is faster than XPath