public final class Config extends Object
<!-- If parameter is empty string or omitted, please see defaults --> <!-- SELENIUM CONFIGURATION --> <!-- optional, defaults to "" or localhost when runLocally is true (GLOBAL) --> <parameter name="seleniumhost" value="" /> <!-- optional, defaults to 4444 (GLOBAL) --> <parameter name="seleniumport" value="" /> <!-- optional, defaults to *firefox --> <parameter name="browser" value="*firefox" /> <!-- optional, defaults to false (GLOBAL) --> <parameter name="runLocally" value="true" /> <!-- optional, turns automatic screen shots for click handlers on/off, defaults to true (GLOBAL) --> <parameter name="autoScreenShot" value="true" /> <!-- optional, used when runLocally is true, defaults to 'default' --> <parameter name="profileName" value="SeleniumProfile" /> <!-- SELION FILES LOCATION --> <!-- optional, default to selionFiles (GLOBAL) --> <parameter name="basedir" value="" /> <!-- optional, default to ${selionFiles.basedir}/selionLogs (GLOBAL) --> <parameter name="workDir" value="" />All other configuration settings can be set in a similar fashion.
Config.ConfigProperty
variable name. So, for instance, to set the execution_timeout to "180000", the following
system property or environment variable should be set prior to initializing SeLion:
SELION_EXECUTION_TIMEOUT = 180000
Modifier and Type | Class and Description |
---|---|
static class |
Config.ConfigProperty
SeLion config properties
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkPropertyExists(String propertyName)
Checks if property exists in the configuration
|
static boolean |
getBoolConfigProperty(Config.ConfigProperty configProperty)
Returns a configuration property boolean value based off the
Config.ConfigProperty |
static boolean |
getBoolConfigProperty(String configProperty)
Returns a configuration property boolean value based off the
Config.ConfigProperty |
static String |
getConfigProperty(Config.ConfigProperty configProperty)
Returns a configuration property String value based off the
Config.ConfigProperty |
static String |
getConfigProperty(String configProperty)
Returns a configuration property String value based off the
Config.ConfigProperty |
static int |
getIntConfigProperty(Config.ConfigProperty configProperty)
Returns a configuration property int value based off the
Config.ConfigProperty |
static int |
getIntConfigProperty(String configProperty)
Returns a configuration property int value based off the
Config.ConfigProperty |
static List<Object> |
getListConfigProperty(Config.ConfigProperty configProperty)
Returns a configuration property List value based off the
Config.ConfigProperty |
static List<Object> |
getListConfigProperty(String configProperty)
Returns a configuration property List value based off the
Config.ConfigProperty |
static void |
initConfig()
Reads and parses configuration file Initializes the configuration, reloading all data
|
static void |
initConfig(org.testng.ISuite suite)
Parses suite parameters and generates SeLion Config object
|
static void |
initConfig(org.testng.ITestContext context)
Parses configuration file and extracts values for test environment
|
static void |
initConfig(Map<Config.ConfigProperty,String> initialValues)
Initializes the configuration, reloading all data while adding the supplied
initialValues to the
configuration. |
static void |
printSeLionConfigValues()
Prints SeLion Config Values
|
static void |
setConfigProperty(Config.ConfigProperty configProperty,
Object configPropertyValue)
Sets a SeLion configuration value.
|
public static void initConfig(org.testng.ISuite suite)
suite
- list of parameters from configuration file within <suite></suite> tagpublic static void initConfig(org.testng.ITestContext context)
context
- list of parameters includes values within <suite></suite> and <test></test>
tagspublic static void initConfig()
public static void printSeLionConfigValues()
public static void initConfig(Map<Config.ConfigProperty,String> initialValues)
initialValues
to the
configuration.initialValues
- The initial set of values used to configure SeLionpublic static String getConfigProperty(Config.ConfigProperty configProperty)
Config.ConfigProperty
configProperty
- The configuration property value to returnpublic static List<Object> getListConfigProperty(Config.ConfigProperty configProperty)
Config.ConfigProperty
configProperty
- The configuration property value to returnpublic static int getIntConfigProperty(Config.ConfigProperty configProperty)
Config.ConfigProperty
configProperty
- The configuration property value to returnpublic static boolean getBoolConfigProperty(Config.ConfigProperty configProperty)
Config.ConfigProperty
configProperty
- The configuration property value to returnpublic static String getConfigProperty(String configProperty)
Config.ConfigProperty
configProperty
- String Property Namepublic static List<Object> getListConfigProperty(String configProperty)
Config.ConfigProperty
configProperty
- String Property Namepublic static int getIntConfigProperty(String configProperty)
Config.ConfigProperty
configProperty
- String Property Namepublic static boolean getBoolConfigProperty(String configProperty)
Config.ConfigProperty
configProperty
- String Property Namepublic static boolean checkPropertyExists(String propertyName)
propertyName
- String Property Namepublic static void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue)
configProperty
- The configuration element to setconfigPropertyValue
- The value of the configuration elementIllegalArgumentException
- If problems occur during the setCopyright © 2016 PayPal Open Source. All rights reserved.