Hey Mridul, Page Factory uses annotation @FindBy to identify Web Elements in the page. The @FindBy annotation supports all the locators that we use to find a web element i.e.:
id, name, className, css, xpath, tagName, linkText and partialLinkText
We can use @FindBy annotation either by specifying both "How" and "using" or by specifying any one of the locators (eg. id):
@FindBy(how = How.ID, using = "username")
private WebElement username;
OR
@FindBy(id="username")
private WebElement userName;
OR
@FindBy(className=".input.username")
private WebElement username;