Automation 4 absolute beginners - Selenium WebDriver_Locators
WebElement Location Statergies: To get know the basic usage of HTML tags - Click Here All the elements on the web page are called WebElements in selenium webdriver. To identify the elements on the Web page uniquely, Selenium has provided support with the following locators 1. ID 2. ClassName 3. TagName 4. Name 5. LinkText 6. Partial LinkText 7. CSS Selector 8. XPath 1. ID ID may be generated dynamically, at that instant of time,this might fail driver.findElement(By.ID("IDValue")); 2. ClassName Multiple classes may have same ClassName, such as Radio buttons, Check boxes. So it might not be possible to identify an individual element uniquely. But when required to identify a group of elements, it will be useful driver.findElement(By.ClassName("Value")); 3. TagName Multiple Elements may have the same TagName, So it might not be possible to identify an individual element uniquely. But when required to identify a group of elements, it will be u...