Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.DefaultSelenium


        final ErrorReporterImpl errorReporter = new ErrorReporterImpl(httpCommandProcessor, testContext);

        ErrorReportingCommandProcessor commandProcessor = new ErrorReportingCommandProcessor(httpCommandProcessor,
                errorReporter);

        final Selenium selenium = new DefaultSelenium(commandProcessor);

        selenium.start();

        testContext.setAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE, baseURL);
        testContext.setAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE, selenium);
        testContext.setAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE, errorReporter);
        testContext.setAttribute(TapestryTestConstants.COMMAND_PROCESSOR_ATTRIBUTE, commandProcessor);

        testContext.setAttribute(TapestryTestConstants.SHUTDOWN_ATTRIBUTE, new Runnable()
        {
            public void run()
            {
                try
                {
                    selenium.stop();
                    seleniumServer.stop();
                    stopWebServer.run();

                    // Output, at the end of the Test, any html capture or screen shots (this makes it much easier
                    // to locate them at the end of the run; there's such a variance on where they end up based
View Full Code Here


        final ErrorReporterImpl errorReporter = new ErrorReporterImpl(httpCommandProcessor, testContext);

        ErrorReportingCommandProcessor commandProcessor = new ErrorReportingCommandProcessor(httpCommandProcessor,
                errorReporter);

        final Selenium selenium = new DefaultSelenium(commandProcessor);

        selenium.start();

        testContext.setAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE, baseURL);
        testContext.setAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE, selenium);
        testContext.setAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE, errorReporter);
        testContext.setAttribute(TapestryTestConstants.COMMAND_PROCESSOR_ATTRIBUTE, commandProcessor);

        testContext.setAttribute(TapestryTestConstants.SHUTDOWN_ATTRIBUTE, new Runnable()
        {
            @Override
            public void run()
            {
                try
                {
                    LOGGER.info("Shutting down selenium client ...");

                    try
                    {
                        selenium.stop();
                    } catch (RuntimeException e)
                    {
                        LOGGER.error("Selenium client shutdown failure.", e);
                    }
View Full Code Here

      this.host = host;
      this.port = port;
    }

    public void createSelenium(String domain) {
      this.selenium = new DefaultSelenium(host, port, browser, domain);
    }
View Full Code Here

            AbstractSeleniumTest.baseUrl = baseUrl;
            AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs;

            if ( getSelenium() == null )
            {
                DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl );
                s.start();
                s.setTimeout( maxWaitTimeInMs );
                selenium.set( s );
            }
        }
        catch ( Exception e )
        {
View Full Code Here

        server.start();

        CommandProcessor cp = new HttpCommandProcessor("localhost", SeleniumServer.DEFAULT_PORT,
                                                       seleniumBrowserCommand, BASE_URL);

        selenium = new DefaultSelenium(new ErrorReportingCommandProcessor(cp));

        selenium.start();
    }
View Full Code Here

      // iexplore, opera, safari. For some not-supported-yet browsers, we
      // use
      // legacy methods: Going through the RC server.
      String selBrowserIdentifierString = "*" + Config.inst().BROWSER;

      selenium = new DefaultSelenium("localhost", 4444, selBrowserIdentifierString, Config.inst().TEAMMATES_URL);
      CommandExecutor executor = new SeleneseCommandExecutor(selenium);
      DesiredCapabilities dc = new DesiredCapabilities();
      setDriver(new RemoteWebDriver(executor, dc));

    }
View Full Code Here

      // iexplore, opera, safari. For some not-supported-yet browsers, we
      // use
      // legacy methods: Going through the RC server.
      String selBrowserIdentifierString = "*" + Config.inst().BROWSER;

      selenium = new DefaultSelenium("localhost", 4444, selBrowserIdentifierString, Config.inst().TEAMMATES_URL);
      CommandExecutor executor = new SeleneseCommandExecutor(selenium);
      DesiredCapabilities dc = new DesiredCapabilities();
      driver = new RemoteWebDriver(executor, dc);

    }
View Full Code Here

  protected DefaultSelenium getSelenium() {
    return selenium;
  }

  protected static DefaultSelenium createSeleniumClient() throws Exception {
    return new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8080/");
  }
View Full Code Here

      // iexplore, opera, safari. For some not-supported-yet browsers, we use
      // legacy methods: Going through the RC server.
      String selBrowserIdentifierString = "*" + Config.BROWSER;

      selenium = new DefaultSelenium("localhost", 4444,
          selBrowserIdentifierString, Config.TEAMMATES_URL);
      CommandExecutor executor = new SeleneseCommandExecutor(selenium);
      DesiredCapabilities dc = new DesiredCapabilities();
      driver = new RemoteWebDriver(executor, dc);

View Full Code Here

    _server.start();

    CommandProcessor cp = new HttpCommandProcessor("localhost", SeleniumServer.DEFAULT_PORT,
        "*firefox", BASE_URL);

    _selenium = new DefaultSelenium(new ErrorReportingCommandProcessor(cp));

    _selenium.start();
  }
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.DefaultSelenium

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.