public BaseStepListener(final Class<? extends WebDriver> driverClass, final File outputDirectory, final Configuration configuration) { this(outputDirectory); this.driver = getProxyFactory().proxyFor(driverClass); this.configuration = configuration; }
/** * Create a step listener with a given web driver type. * * @param driverClass a driver of this type will be used * @param outputDirectory reports and screenshots are generated here */ public BaseStepListener(final Class<? extends WebDriver> driverClass, final File outputDirectory) { this(outputDirectory); this.driver = getProxyFactory().proxyFor(driverClass); }
/** * Create a step listener with a given web driver type. * * @param driverClass a driver of this type will be used * @param outputDirectory reports and screenshots are generated here */ public BaseStepListener(final Class<? extends WebDriver> driverClass, final File outputDirectory) { this(outputDirectory); this.driver = getProxyFactory().proxyFor(driverClass); }
/** * Create a step listener with a given web driver type. * * @param driverClass a driver of this type will be used * @param outputDirectory reports and screenshots are generated here */ public BaseStepListener(final Class<? extends WebDriver> driverClass, final File outputDirectory) { this(outputDirectory); this.driver = getProxyFactory().proxyFor(driverClass); }
public BaseStepListener(final Class<? extends WebDriver> driverClass, final File outputDirectory, final Configuration configuration) { this(outputDirectory); this.driver = getProxyFactory().proxyFor(driverClass); this.configuration = configuration; }
public WebDriverFacade proxyFor(final Class<? extends WebDriver> driverClass) { return proxyFor(driverClass, new WebDriverFactory()); }
public WebDriverFacade proxyFor(final Class<? extends WebDriver> driverClass) { return proxyFor(driverClass, new WebDriverFactory(), Injectors.getInjector().getInstance(Configuration.class)); }
public WebDriverFacade proxyFor(final Class<? extends WebDriver> driverClass) { return proxyFor(driverClass, new WebDriverFactory(), ConfiguredEnvironment.getConfiguration()); }
public WebDriver proxyDriver() { Class<? extends WebDriver> driverClass = webDriverFactory.getClassFor(configuration.getDriverType()); return proxyFor(driverClass, webDriverFactory); }
public WebDriver proxyDriver() { Class<? extends WebDriver> driverClass = webDriverFactory.getClassFor(configuration.getDriverType()); return proxyFor(driverClass, webDriverFactory, Injectors.getInjector().getInstance(Configuration.class)); }
public WebDriver proxyDriver() { Class<? extends WebDriver> driverClass = webDriverFactory.getClassFor(configuration.getDriverType()); return proxyFor(driverClass, webDriverFactory, ConfiguredEnvironment.getConfiguration()); }
public WebDriverFacade proxyFor(final Class<? extends WebDriver> driverClass, final WebDriverFactory webDriverFactory, Configuration configuration, String options) { if (mockDriver != null) { return mockDriver; } else { return new WebDriverFacade(driverClass, webDriverFactory, configuration.getEnvironmentVariables()).withOptions(options); } }
/** * Create a new driver instance based on system property values. You can * override this method to use a custom driver if you really know what you * are doing. * * @throws net.thucydides.core.webdriver.UnsupportedDriverException * if the driver type is not supported. */ private static WebDriver newDriver(final Configuration configuration, final WebDriverFactory webDriverFactory, final String driver) { SupportedWebDriver supportedDriverType = getConfiguredWebDriverWithOverride(configuration, driver); Class<? extends WebDriver> webDriverType = webDriverFactory.getClassFor(supportedDriverType); return WebdriverProxyFactory.getFactory().proxyFor(webDriverType, webDriverFactory); }
public SmartAjaxElementLocator(Clock clock, SearchContext searchContext, Field field, MobilePlatform platform, Integer defaultTimeoutInSeconds) { super(searchContext, field, platform); this.timeOutInSeconds = defaultTimeoutInSeconds; this.annotatedTimeoutInSeconds = timeoutFrom(field); this.clock = clock; this.field = field; if (searchContext instanceof WebDriverFacade) { if (annotatedTimeoutInSeconds.isPresent()) { this.searchContext = ((WebDriverFacade) searchContext) .withTimeoutOf(new Duration(annotatedTimeoutInSeconds.get(), TimeUnit.SECONDS)); } else { this.searchContext = searchContext; } } else if (searchContext instanceof WebElementFacade) { if (annotatedTimeoutInSeconds.isPresent()) { this.searchContext = ((WebElementFacade) searchContext).withTimeoutOf(annotatedTimeoutInSeconds.get(), TimeUnit.SECONDS); } else { this.searchContext = searchContext; } } else if (searchContext instanceof WebDriver) { this.searchContext = WebdriverProxyFactory.getFactory().proxyFor((WebDriver) searchContext); } else { this.searchContext = searchContext; } this.platform = platform; }
/** * Create a new driver instance based on system property values. You can * override this method to use a custom driver if you really know what you * are doing. * * @throws net.thucydides.core.webdriver.UnsupportedDriverException * if the driver type is not supported. */ private static WebDriver newDriver(final Configuration configuration, final WebDriverFactory webDriverFactory, final String driver) { SupportedWebDriver supportedDriverType = getConfiguredWebDriverWithOverride(configuration, driver); Class<? extends WebDriver> webDriverType = webDriverFactory.getClassFor(supportedDriverType); return WebdriverProxyFactory.getFactory().proxyFor(webDriverType, webDriverFactory, configuration); }
/** * Create a new driver instance based on system property values. You can * override this method to use a custom driver if you really know what you * are doing. * * @throws UnsupportedDriverException * if the driver type is not supported. */ private static WebDriver newDriver(final DriverConfiguration configuration, final WebDriverFactory webDriverFactory, final String driver, final String options) { SupportedWebDriver supportedDriverType = getConfiguredWebDriverWithOverride(configuration, driver); Class<? extends WebDriver> webDriverType = webDriverFactory.getClassFor(supportedDriverType); return WebdriverProxyFactory.getFactory().proxyFor(webDriverType, webDriverFactory, configuration, options); }