-
Notifications
You must be signed in to change notification settings - Fork 2
05. How to read from property file to Page Factory
Hemanth Sridhar edited this page Dec 13, 2021
·
1 revision
password_id=pass
user_name_id=email
loginButton_css=button[name='login']
allTextboxes_xpath=//input[@type='text']
something1_xpath=bla
@FilePath(value = PageObjectsConfig.ERROR_MSG_PAGE)
public class ErrorPopupPage extends PageInitializer {
@SearchBy
private WebElement password;
@SearchBy(nameOfTheLocator="user_name")
private WebElement userName;
}
- The @FilePath value must be the path to the json
- The nameOfTheLocator value is optional. By default, the variable name is picked up.