com.appfoundation.automation.framework
Class RuntimeProperties

java.lang.Object
  extended by com.appfoundation.automation.framework.RuntimeProperties

public class RuntimeProperties
extends java.lang.Object

Runtime Properties

Contains runtime properties as a singleton, as defined in the properties file on the root level of the classpath.

Author:
john.valentino

Field Summary
private  java.lang.String baseUrl
          The base URL which is the prefix on any URL used to get a page
private  java.lang.String buildDirectory
          Location that the running system will consider the build output directory
private  java.lang.String chromeDriver
          The location of the Chrome driver
private  int defaultTimeout
          The default timeout settings for activities which involve waiting
private  java.lang.String firefoxExe
          The location of firefox
private  java.lang.String ieDriver
          The location of the IE Driver EXE
private static RuntimeProperties instance
           
private static org.apache.log4j.Logger log
           
private  java.lang.String safariExe
          The location of the Safari EXE
 
Constructor Summary
private RuntimeProperties()
           
 
Method Summary
 java.lang.String getBaseUrl()
          Returns the base URL which is the prefix on any URL used to get a page, given as the property base.url
 java.lang.String getBuildDirectory()
          Returns the location that the running system will consider the build output directory , as defined in the properties file with build.directory
 java.lang.String getChromeDriver()
          Returns the location of the chrome driver as define in the properties file as chrome.driver
 int getDefaultTimeout()
           
 java.lang.String getFirefoxExe()
          Returns the location of firefox as defined in the properties file as firefox.exe
 java.lang.String getIEDriver()
          Returns the location of the IE Driver EXE as specified in the properties file by ie.driver
static RuntimeProperties getInstance()
          Returns the instance
 java.lang.String getSafariExe()
          Returns the location of the Safari EXE as specified in the properties file by safari.exe
private  void load(java.util.Properties properties)
           
 void loadFromFile(java.io.File file)
           
 void overrideBaseUrl(java.lang.String url)
           
 void overrideBuildDirectory(java.lang.String location)
           
 void overrideDefaultTimeout(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log

buildDirectory

private java.lang.String buildDirectory
Location that the running system will consider the build output directory


firefoxExe

private java.lang.String firefoxExe
The location of firefox


chromeDriver

private java.lang.String chromeDriver
The location of the Chrome driver


baseUrl

private java.lang.String baseUrl
The base URL which is the prefix on any URL used to get a page


ieDriver

private java.lang.String ieDriver
The location of the IE Driver EXE


safariExe

private java.lang.String safariExe
The location of the Safari EXE


defaultTimeout

private int defaultTimeout
The default timeout settings for activities which involve waiting


instance

private static RuntimeProperties instance
Constructor Detail

RuntimeProperties

private RuntimeProperties()
Method Detail

loadFromFile

public void loadFromFile(java.io.File file)

load

private void load(java.util.Properties properties)

overrideBuildDirectory

public void overrideBuildDirectory(java.lang.String location)

overrideBaseUrl

public void overrideBaseUrl(java.lang.String url)

overrideDefaultTimeout

public void overrideDefaultTimeout(java.lang.String value)

getInstance

public static RuntimeProperties getInstance()
Returns the instance

Returns:

getBuildDirectory

public java.lang.String getBuildDirectory()
Returns the location that the running system will consider the build output directory , as defined in the properties file with build.directory

Returns:

getFirefoxExe

public java.lang.String getFirefoxExe()
Returns the location of firefox as defined in the properties file as firefox.exe

Returns:

getChromeDriver

public java.lang.String getChromeDriver()
Returns the location of the chrome driver as define in the properties file as chrome.driver

Returns:

getBaseUrl

public java.lang.String getBaseUrl()
Returns the base URL which is the prefix on any URL used to get a page, given as the property base.url

Returns:

getIEDriver

public java.lang.String getIEDriver()
Returns the location of the IE Driver EXE as specified in the properties file by ie.driver

Returns:

getSafariExe

public java.lang.String getSafariExe()
Returns the location of the Safari EXE as specified in the properties file by safari.exe

Returns:

getDefaultTimeout

public int getDefaultTimeout()