Selenium Locators usage
There are 8 Locators 1.Id 2.Name 3.ClassName 4.TagName 5.LinkText 6.PartialLinkText 7.CssSelector 8.Xpath Usages of the Locators Webdriver driver=new chromedriver(); driver.FindElement(By.id("id")); driver.FindElement(By.name("name")); driver.FindElement(By.ClassName("classname")); These class names and tagnames mostly used for likely elements if see above example when we enter class name then we will get all the text fields present in that page we can enter all the fields by using loops. driver.FindElement(By.TagName("tagname")); These class names and tagnames mostly used for likely elements if see above example when we enter class name th...

Comments
Post a Comment