Skip to content

Instantly share code, notes, and snippets.

@slawekradzyminski
Created January 17, 2016 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slawekradzyminski/ba845ff5c7d0c0b1860d to your computer and use it in GitHub Desktop.
Save slawekradzyminski/ba845ff5c7d0c0b1860d to your computer and use it in GitHub Desktop.
package org.fluentlenium.sample.support;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
/**
* Created by s.radzyminski on 12/22/2015.
*/
public class LoadProperties {
public static final String PATH_TO_PROPERTIES = "/Users/s.radzyminski/IdeaProjects/slawek/FluentLenium/fluentlenium-testng/src/test/java/org/fluentlenium/sample/resources/user.properties";
public static Properties user = loadProperties(PATH_TO_PROPERTIES);
private static Properties loadProperties(String filePath) {
Properties properties = new Properties();
try {
FileInputStream f = new FileInputStream(filePath);
properties.load(f);
} catch (IOException e) {
e.printStackTrace();
}
return properties;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment