| What is Locators and define Selenium Locators?
If you are doing in Selenium and as a quality engineer you must know that to do a testing on web based application you must perform some specific actions(like click and type etc.) on HTML elements. And when we go for automation of applications, the automation tool should also be capable of performing same operations on the HTML elements what a human is capable of. Now question comes how a automation tool identify on which HTML element they need to perform a particular operation? The answer here is "Locators in Selenium".
Now comes to Locators, Locators are the way to identify an HTML element on the web page what we need to test. And almost all of UI automation tools provide the capability to use locators to identify the location of HTML elements on the web page. So Selenium also uses the ability of use "Locators" for the identification of HTML elements and are popularly knowns as "Selenium Locators".
In another word we can say identification of correct GUI element on any given web page is one of the basic requirement for any of successful automation script. So this is where locators come into picture. So we can say the "Locators" are the essential components of Selenium infrastructure which support Selenium to uniquely identifying the Web-Elements like Textbox, Button and many more available on web page. | | |