COMMON ELEMENT LOCATORS IN SELENIUM


With the help of element locators we try to locate an element on AUT uniquely.

 
The different types of locator are:
 ID
   
 Name

 Identifier( Works only in RC, check value with ID if not found then match with name)

   Identifier= name or id (if we don’t pass identifier=, it default assume, this is an identifier

 Link Text

 CSS Selector
•   Tag and ID
•   Tag and class
•   Tag and attribute
•   Tag, class, and attribute
•   Inner text

 DOM (Document Object Model)
•   getElementById
•   getElementsByName
•   dom:name
•   dom:index

 XPath

1 comment :

1 comment :

  1. Hi Brother Can you give 2 examples for how to take CSS& DOM in selenium on google or facebook websites.

    ReplyDelete