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 StringAdditional driver capabilities to consider during driver instantiation.static final StringThe implicit driver wait timeout.static final StringAdditional driver options to consider during driver instantiation.static final StringThe driver's platform.static final StringAdditional driver preferences to consider during driver instantiation.static final StringWhether the driver should quit after testing.static final StringA driver remote URL.static final StringThe driver's version.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 org.openqa.selenium.CapabilitiesReturns the configured driver capabilities to consider during driver instantiation.Returns the configured driver options to consider during driver instantiation.Returns the configured driver preferences to consider during driver instantiation.static StringGet Driver version.static intRetrieves the configured implicit timeout.static StringGet Platform Name.static URLGet remote driver URL.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_OPTIONS
Additional driver options to consider during driver instantiation.- See Also:
-
DRIVER_CAPABILITIES
Additional driver capabilities to consider during driver instantiation.- See Also:
-
DRIVER_PREFERENCES
Additional driver preferences to consider during driver instantiation. When using Firefox, they will be inserted into aFirefoxProfile. For Chromium, they will be inserted usingexperimental options.- 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:
-
-
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
-
getDriverOptions
Returns the configured driver options to consider during driver instantiation.- Returns:
- the driver options
-
getDriverCapabilities
public static org.openqa.selenium.Capabilities getDriverCapabilities()Returns the configured driver capabilities to consider during driver instantiation.- Returns:
- the driver capabilities
-
getDriverPreferences
Returns the configured driver preferences to consider during driver instantiation.- Returns:
- the driver preferences
-
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
-