Class SeleniumDriverConfigHelper

java.lang.Object
de.qytera.qtaf.core.selenium.helper.SeleniumDriverConfigHelper

public class SeleniumDriverConfigHelper extends Object
Helper class for getting selenium driver configuration values.
  • Field Details

    • DRIVER_IMPLICIT_WAIT_TIMEOUT

      public static final String DRIVER_IMPLICIT_WAIT_TIMEOUT
      The implicit driver wait timeout.
      See Also:
    • DRIVER_REMOTE_URL

      public static final String DRIVER_REMOTE_URL
      A driver remote URL.
      See Also:
    • DRIVER_PLATFORM

      public static final String DRIVER_PLATFORM
      The driver's platform.
      See Also:
    • DRIVER_VERSION

      public static final String DRIVER_VERSION
      The driver's version.
      See Also:
    • DRIVER_OPTIONS

      public static final String DRIVER_OPTIONS
      Additional driver options to consider during driver instantiation.
      See Also:
    • DRIVER_CAPABILITIES

      public static final String DRIVER_CAPABILITIES
      Additional driver capabilities to consider during driver instantiation.
      See Also:
    • DRIVER_PREFERENCES

      public static final String DRIVER_PREFERENCES
      Additional driver preferences to consider during driver instantiation. When using Firefox, they will be inserted into a FirefoxProfile. For Chromium, they will be inserted using experimental options.
      See Also:
    • DRIVER_QUIT_AFTER_TESTING

      public static final String DRIVER_QUIT_AFTER_TESTING
      Whether the driver should quit after testing.
      See Also:
    • SCREENSHOTS_BEFORE_SCENARIO

      public static final String SCREENSHOTS_BEFORE_SCENARIO
      Whether Selenium should take a screenshot before each scenario.
      See Also:
    • SCREENSHOTS_AFTER_SCENARIO

      public static final String SCREENSHOTS_AFTER_SCENARIO
      Whether Selenium should take a screenshot after each scenario.
      See Also:
    • SCREENSHOTS_BEFORE_STEP

      public static final String SCREENSHOTS_BEFORE_STEP
      Whether Selenium should take a screenshot before each step.
      See Also:
    • SCREENSHOTS_AFTER_STEP

      public static final String SCREENSHOTS_AFTER_STEP
      Whether Selenium should take a screenshot after each step.
      See Also:
    • SCREENSHOTS_AFTER_STEP_FAILURE

      public static final String 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

      public static URL getRemoteUrl()
      Get remote driver URL.
      Returns:
      remote URL
    • getPlatformName

      public static String getPlatformName()
      Get Platform Name.
      Returns:
      platform name
    • getDriverVersion

      public static String getDriverVersion()
      Get Driver version.
      Returns:
      driver version
    • getDriverOptions

      public static List<String> 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

      public static Map<String,Object> 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