public WebDriverFacade proxyFor(final Class<? extends WebDriver> driverClass, final WebDriverFactory webDriverFactory, Configuration configuration) { if (mockDriver != null) { return mockDriver; } else { return new WebDriverFacade(driverClass, webDriverFactory, configuration.getEnvironmentVariables()); } }
private File getOutputDirectory() { return this.configuration.getOutputDirectory(); }
private static SupportedWebDriver getConfiguredWebDriverWithOverride(final Configuration configuration, final String driver) { if (StringUtils.isEmpty(driver)) { return configuration.getDriverType(); } else { return SupportedWebDriver.getDriverTypeFor(driver); } }
public ElementLocatorFactorySelector(Configuration configuration) { this(configuration.getElementTimeout(), configuration.getEnvironmentVariables()); }
@Inject public ReportService(final Configuration configuration) { this(configuration.getOutputDirectory(), getDefaultReporters(), configuration.getEnvironmentVariables()); }
private boolean legacyScreenshotConfiguration(TakeScreenshots takeScreenshots) { if (configuration.onlySaveFailingScreenshots()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.FOR_FAILURES); } if (configuration.takeVerboseScreenshots()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.FOR_EACH_ACTION); } return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.BEFORE_AND_AFTER_EACH_STEP); }
public String getSystemBaseUrl() { return configuration.getBaseUrl(); } }
public static TestOutcomes of(List<? extends TestOutcome> outcomes) { return new TestOutcomes(outcomes, Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount()); }
public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime) { this(consequenceThatMightTakeSomeTime, ConfiguredEnvironment.getConfiguration().getElementTimeout() * 1000); }
public boolean areAllowed(TakeScreenshots takeScreenshots) { TakeScreenshots configuredLevel = methodOverride(). orElse(classOverride().orElse(configuration.getScreenshotLevel().orElse(TakeScreenshots.UNDEFINED))); if (configuredLevel != TakeScreenshots.UNDEFINED) { return takeScreenshotLevel(takeScreenshots).isAtLeast(configuredLevel); } else { return legacyScreenshotConfiguration(takeScreenshots); } }
private void pauseIfRequired() { int delay = configuration.getStepDelay(); if (delay > 0) { getClock().pauseFor(delay); } }
public ElementLocatorFactorySelector(Configuration configuration) { this(configuration.getElementTimeout(), configuration.getEnvironmentVariables()); }
private boolean legacyScreenshotConfiguration(TakeScreenshots takeScreenshots) { if (configuration.onlySaveFailingScreenshots()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.FOR_FAILURES); } if (configuration.takeVerboseScreenshots()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.FOR_EACH_ACTION); } return takeScreenshotLevel(takeScreenshots).isAtLeast(TakeScreenshots.BEFORE_AND_AFTER_EACH_STEP); }
public String getSystemBaseUrl() { return configuration.getBaseUrl(); } }
public static TestOutcomes withNoResults() { return new TestOutcomes(NO_OUTCOMES, Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount()); }
public boolean areAllowed(TakeScreenshots takeScreenshots) { Optional<TakeScreenshots> overrideLevel = methodOverride(); if (overrideLevel.isPresent()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(overrideLevel.get()); } Optional<TakeScreenshots> configuredLevel = configuration.getScreenshotLevel(); if (configuredLevel.isPresent()) { return takeScreenshotLevel(takeScreenshots).isAtLeast(configuredLevel.get()); } else { return legacyScreenshotConfiguration(takeScreenshots); } }
private void pauseIfRequired() { int delay = configuration.getStepDelay(); if (delay > 0) { getClock().pauseFor(delay); } }
private File getRequirementsDirectory() { return new File(configuration.getOutputDirectory(),"requirements"); }
private boolean shouldTagErrors() { return ThucydidesSystemProperty.SERENITY_TAG_FAILURES.booleanFrom(configuration.getEnvironmentVariables()); }
public ElementLocatorFactorySelector(Configuration configuration) { this(configuration.getElementTimeout(), configuration.getEnvironmentVariables()); }