A web page is comprised of many different HTML elements, such as buttons, links, a body, labels, forms, and so on, that are named WebElements in the context of WebDriver. Together, these elements on a web page will achieve the business functionality. For example, let's look at the HTML code of the login page of a website.
<html> <body> <form id="loginForm"> <label>Enter Username: </label> <input type="text" name="Username"/> <label>Enter Password: </label> <input type="password" name="Password"/> <input type="submit"/> </form> <a href="forgotPassword.html">Forgot Password ?</a> </body> </html>
In the preceding HTML code, there are different types of WebElements such as
<a>, which together ...