If you have queries or want to connect with me for business then you can contact me directly by using below form! I'll connect with you as soon as possible.
Selenium is an open source library/toolset for automating web browser interactions within a web application. Now these interactions can be created using Locators. These locators are used to identify webElements within a web page. These elements can vary from images, buttons, dropDowns, calendars, input fields etc. Now, What are different types of locators in Selenium? ID - A webElement having a unique ID attribute, then it can be used to identify it. Example - driver.findElement(By.id("depart-from")); NAME - A webElement having a unique NAME attribute, but in most cases multiple elements can have the same name, so it’s less reliable. Example - driver.findElement(By.name("signInButton")); LinkText : Accessing links using their exact link text, This makes it easy to create such locators, but these are flaky because they can fail when text changes for links used. Example: driver.findElement(By.linkText("click here")).click(); Partial LinkText : Accessin
Comments
Post a Comment