Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.DefaultSelenium


import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleniumLogLevels;

public class Scrap {
  public static void main(String[] args) {
    Selenium selenium = new DefaultSelenium("http://www.google.com", SeleniumServer.getDefaultPort(), "*firefox",
        "http://www.google.com");
    selenium.start();
    selenium.setContext("A real test, using the real Selenium on the browser side served by Jetty, driven from Java");
    selenium.setBrowserLogLevel(SeleniumLogLevels.WARN);

    Browser browser = new DefaultBrowser(selenium);
    browser.open("/");
    selenium.stop();

    Page currentPage = browser.currentPage();
    Form form = currentPage.form("id");
    Field field = form.field("fieldName");
  }
View Full Code Here


public class SeleniumTestCase {
  private static Selenium selenium;

  @BeforeClass
  public static void beforeStartup() {
    selenium = new DefaultSelenium("localhost", SeleniumServer.getDefaultPort(), "*firefox",
        "http://localhost:8080/seleniumdsl/");
    selenium.start();
    selenium.setContext("Selenium DSL testing");
    selenium.setBrowserLogLevel(SeleniumLogLevels.DEBUG);
  }
View Full Code Here

  private Browser browser;

  @BeforeClass
  public static void beforeStartup() {
    selenium = new DefaultSelenium("localhost", SeleniumServer.getDefaultPort(), "*firefox",
        "http://localhost:8080/");
    selenium.start();
    selenium.setContext("Selenium DSL testing");
    selenium.setBrowserLogLevel(SeleniumLogLevels.DEBUG);
  }
View Full Code Here

    final static String PRODUCTION = "http://drichard.org/mindmaps/";
  }

  @BeforeClass
  public static void setUp() {
    selenium = new DefaultSelenium("localhost", 4444, Browser.CHROME,
        Server.DEVELOPMENT);
    selenium.start();
  }
View Full Code Here

    *
    * @see org.jboss.arquillian.drone.spi.Instantiator#createInstance(org.jboss. arquillian.drone.spi.DroneConfiguration)
    */
   public DefaultSelenium createInstance(SeleniumConfiguration configuration)
   {
      DefaultSelenium selenium = new DefaultSelenium(configuration.getServerHost(), configuration.getServerPort(), configuration.getBrowser(), configuration.getUrl());
      selenium.start();
      selenium.setSpeed(String.valueOf(configuration.getSpeed()));
      selenium.setTimeout(String.valueOf(configuration.getTimeout()));

      return selenium;
   }
View Full Code Here

        _server = new SeleniumServer();
       
        _server.start();

        _selenium = new DefaultSelenium("localhost", SeleniumServer.DEFAULT_PORT, "*firefox", BASE_URL);

        _selenium.start();
    }
View Full Code Here

     * address specified by configuration annotation.
     *
     * @return A {@link DefaultSelenium} object.
     */
    public Selenium create() {
        return new DefaultSelenium(configuration.serverHost(),
                configuration.serverPort(), browserStartCommand,
                configuration.browserURL());
    }
View Full Code Here

   * address specified by configuration annotation.
   *
   * @return A {@link DefaultSelenium} object.
   */
  public Selenium create() {
    return new DefaultSelenium(configuration.serverHost(),
        configuration.serverPort(), browserStartCommand,
        configuration.browserURL());
  }
View Full Code Here

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

      this.specifier = specifier;
      parseSpecifier();
    }

    public void createSelenium(String domain) {
      this.selenium = new DefaultSelenium(host, port, browser, domain);
    }
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.