One of these is using the properties file. User can store the data in properties file and use its content for the selenium test
Here is a properties file with some content. Name it as datasuite.properties
Directory = C:/prodFiles/
NumberOfFiles = 25
Extension = javaworld
and the corresponding java code to manipulate it
InputStream is = this.getClass().getResourceAsStream("/conf/datasuite.properties");
Properties prop = new Properties();
prop.load(is);
String directory = prop.getProperty("Directory");
String numberOfFiles = prop.getProperty("NumberOfFiles");
String fileExtension = prop.getProperty("Extension");
is.close();
System.out.println(directory+" "+numberOfFiles+" "+fileExtension);
Below is the folder structure
No comments:
Post a Comment