InterviewSolution
Saved Bookmarks
| 1. |
Explain Page Factory model in Selenium? |
|
Answer» Page Factory in Selenium is an extension to Page OBJECT Model and can be used to initialize web elements that are defined in web page classes or Page Objects. Page Factory will initialize every WebElement VARIABLE with a reference to a corresponding ELEMENT on the actual web page based on configured “locators”. This is done by using the annotation @FindBy. Example @FindBy(XPATH = "(//OPTION[text()='Basic auth'])[2]") private WebElement typeSctApp; |
|