What are Selenium Locators and Find Element Commands?
Selenium Locators Locators are used to tell Selenium that on which GUI element (text box, radio boxes, links, buttons etc.) action has to be performed. We must have basic knowledge of HTML in order to learn locator techniques. There are total of 8 locators by which we can find element in Selenium WebDriver. Here is the list: ID Class Name Name Link Text Partial Link Text Tag Name Xpaths CSS Selector Selenium Locators Video Tutorial (YouTube) 1. Locate by ID, Name and ClassName These three are the most common type of locators. Id, Name and ClassName are the attributes used along with html tags. These attributes are given by Front-end developers for CSS designing. Automation testers make use of these attributes for locating elements. Example HTML Code for Login Page using Id, Name and ClassName attributes: " <html> <title>Sample Login Page </title> <body> <input type='text' id='username' name=&