Use property file in Selenium

How to use properties file in Selenium
Step1 : Create a properties file inside src folder



Step2 : Now go to java program, create a ResourceBundle class object

ResourceBundle a = ResourceBundle.getBundle("config");

Step 3  Access variable value from file using getString method
System.out.println(a.getString("name"));



No comments :

No comments :

Post a Comment