Class SeleniumDriverConfigHelper
java.lang.Object
de.qytera.qtaf.core.selenium.helper.SeleniumDriverConfigHelper
Helper class for getting selenium driver configuration values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe implicit driver wait timeout.static final StringThe driver's platform.static final StringWhether the driver should quit after testing.static final StringA driver remote URL.static final StringThe driver's version.static final StringThe Saucelabs access key.static final StringThe Saucelabs browser name.static final StringThe Saucelabs username.static final StringWhether Selenium should take a screenshot after each scenario.static final StringWhether Selenium should take a screenshot after each step.static final StringWhether Selenium should take a screenshot on step failure.static final StringWhether Selenium should take a screenshot before each scenario.static final StringWhether Selenium should take a screenshot before each step. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet Driver version.static intRetrieves the configured implicit timeout.static StringGet Platform Name.static URLGet remote driver URL.static StringGet Saucelab Access Key.static StringGet Saucelab Browser Name.static StringGet Saucelab Username.static booleanDetermine if QTAF should quit driver after testing.static booleanDetermine if screenshots should be taken after a scenario.static booleanDetermine if screenshots should be taken after a step.static booleanDetermine if screenshots should be taken after a step failure.static booleanDetermine if screenshots should be taken before a scenario.static booleanDetermine if screenshots should be taken before a step.
-
Field Details
-
DRIVER_IMPLICIT_WAIT_TIMEOUT
The implicit driver wait timeout.- See Also:
-
DRIVER_REMOTE_URL
A driver remote URL.- See Also:
-
DRIVER_PLATFORM
The driver's platform.- See Also:
-
DRIVER_VERSION
The driver's version.- See Also:
-
DRIVER_QUIT_AFTER_TESTING
Whether the driver should quit after testing.- See Also:
-
SCREENSHOTS_BEFORE_SCENARIO
Whether Selenium should take a screenshot before each scenario.- See Also:
-
SCREENSHOTS_AFTER_SCENARIO
Whether Selenium should take a screenshot after each scenario.- See Also:
-
SCREENSHOTS_BEFORE_STEP
Whether Selenium should take a screenshot before each step.- See Also:
-
SCREENSHOTS_AFTER_STEP
Whether Selenium should take a screenshot after each step.- See Also:
-
SCREENSHOTS_AFTER_STEP_FAILURE
Whether Selenium should take a screenshot on step failure.- See Also:
-
SAUCE_USERNAME
The Saucelabs username.- See Also:
-
SAUCE_ACCESS_KEY
The Saucelabs access key.- See Also:
-
SAUCE_BROWSER_NAME
The Saucelabs browser name.- See Also:
-
-
Method Details
-
getImplicitTimeout
public static int getImplicitTimeout()Retrieves the configured implicit timeout. Defaults to 30 seconds if no implicit timeout has been specified.- Returns:
- the implicit timeout
- See Also:
-
getRemoteUrl
Get remote driver URL.- Returns:
- remote URL
-
getPlatformName
Get Platform Name.- Returns:
- platform name
-
getDriverVersion
Get Driver version.- Returns:
- driver version
-
getSaucelabBrowserName
Get Saucelab Browser Name.- Returns:
- Saucelab Browser Name
-
getSaucelabUsername
Get Saucelab Username.- Returns:
- Saucelab Username
-
getSaucelabAccessKey
Get Saucelab Access Key.- Returns:
- Saucelab Access Key
-
shouldQuitDriverAfterTesting
public static boolean shouldQuitDriverAfterTesting()Determine if QTAF should quit driver after testing.- Returns:
- value from configuration
-
shouldTakeScreenshotsBeforeScenario
public static boolean shouldTakeScreenshotsBeforeScenario()Determine if screenshots should be taken before a scenario.- Returns:
- value from configuration
-
shouldTakeScreenshotsAfterScenario
public static boolean shouldTakeScreenshotsAfterScenario()Determine if screenshots should be taken after a scenario.- Returns:
- value from configuration
-
shouldTakeScreenshotsBeforeStep
public static boolean shouldTakeScreenshotsBeforeStep()Determine if screenshots should be taken before a step.- Returns:
- value from configuration
-
shouldTakeScreenshotsAfterStep
public static boolean shouldTakeScreenshotsAfterStep()Determine if screenshots should be taken after a step.- Returns:
- value from configuration
-
shouldTakeScreenshotsAfterStepFailure
public static boolean shouldTakeScreenshotsAfterStepFailure()Determine if screenshots should be taken after a step failure.- Returns:
- value from configuration
-