Note that there are two ways of using the annotation. Examples:
@FindBy(id = "id")
and
@FindBy(how = How.ID, using ="id")
are equal and both look for element by its ID. In case of ID_OR_NAME
you can only use
@FindBy(how = How.ID_OR_NAME, using ="idOrName")
PageFactory.initElements()
must be used after page object instantiation to find elements marked with @FindBy
annotation.