What Is initElements
The initElements Is a Static Method of Pagefactory Class Which Is Used to Initialize All the Web Elements Located by @Findby Annotation. Thus, Instantiating...
The initElements is a static method of PageFactory class which is used to initialize all the web elements located by @FindBy annotation. Thus, instantiating the Page classes easily.
What does PageFactory initElements driver this ); mean?
PageFactory. initElements() static method takes the driver instance of the given class and the class type, and returns a Page Object with its fields fully initialized.
What is difference between POM and page factory?
S.No.POMPageFactory4.’By’ annotation is used to define page objects.It uses annotation ‘FindBy’ to describe page objects.