Package net.thucydides.core.webdriver

Examples of net.thucydides.core.webdriver.WebDriverFactory


     * Only called reflectively. Do not use programmatically.
     * @param klass The test class to run
     * @throws Throwable Cause shit happens
     */
    public ThucydidesParameterizedRunner(final Class<?> klass) throws Throwable {
        this(klass, Injectors.getInjector().getInstance(Configuration.class), new WebDriverFactory(),
            Injectors.getInjector().getInstance(BatchManager.class));
    }
View Full Code Here


        configuration = Injectors.getInjector().getInstance(Configuration.class);
        webdriverManager = Injectors.getInjector().getInstance(WebdriverManager.class);
        outputDirectory = configuration.getOutputDirectory();
        this.defaultDriver = defaultDriver;
        if (defaultDriver != null) {
            webDriverFactory = new WebDriverFactory();
            pages =  new Pages(getDriver());
            stepFactory = new StepFactory(pages);
        } else {
            stepFactory = new StepFactory();
        }
View Full Code Here

        }
    }

    protected ThucydidesRunner getNormalTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        return new ThucydidesRunner(testClass, factory, configuration);
    }
View Full Code Here

        return new ThucydidesRunner(testClass, factory, configuration);
    }
   
    protected ThucydidesParameterizedRunner getTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        BatchManager batchManager = new BatchManagerProvider(configuration).get();
        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager);
    }
View Full Code Here

        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager);
    }

    protected ThucydidesParameterizedRunner getStubbedTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        BatchManager batchManager = new BatchManagerProvider(configuration).get();
        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager) {
            @Override
            public void generateReports() {
                //do nothing
View Full Code Here

            }

        };

        environmentVariables = new MockEnvironmentVariables();
        webDriverFactory = new WebDriverFactory(webdriverInstanceFactory, environmentVariables);
        StepEventBus.getEventBus().clear();

    }
View Full Code Here

    static WebDriver localDriver;
    static StaticSitePage page;

    @BeforeClass
    public static void openStaticPage() {
        localDriver = new WebDriverFacade(HtmlUnitDriver.class, new WebDriverFactory());
        page = new StaticSitePage(localDriver, 1);
        page.setWaitForTimeout(750);
        page.open();
    }
View Full Code Here

    WebDriverFactory factory;

    @Before
    public void setupFactory() {
        environmentVariables = new MockEnvironmentVariables();
        factory = new WebDriverFactory(environmentVariables);
    }
View Full Code Here

    static WebDriver htmlUnitDriver;
    static StaticSitePage page;

    @BeforeClass
    public static void openStaticPage() {
        htmlUnitDriver = new WebDriverFacade(HtmlUnitDriver.class, new WebDriverFactory());
        page = new StaticSitePage(htmlUnitDriver, 1);
        page.setWaitForTimeout(750);
        page.open();
    }
View Full Code Here

    @Test
    public void should_honor_chromdriver_bin_path_in_environment_properties() {
        environmentVariables.setProperty("webdriver.chrome.driver","/path/to/chromedriver/bin");
        try {
            WebDriver webdriver = new WebDriverFactory(environmentVariables).newInstanceOf(SupportedWebDriver.CHROME);
            webdriver.get("http://www.google.com");
        } catch (UnsupportedDriverException couldNotFindDriver) {
            assertThat(couldNotFindDriver.getCause().getMessage()).contains("The driver executable does not exist: /path/to/chromedriver/bin");
        }
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.webdriver.WebDriverFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.