Example usage for org.openqa.selenium.firefox FirefoxDriver FirefoxDriver

List of usage examples for org.openqa.selenium.firefox FirefoxDriver FirefoxDriver

Introduction

In this page you can find the example usage for org.openqa.selenium.firefox FirefoxDriver FirefoxDriver.

Prototype

public FirefoxDriver() 

Source Link

Usage

From source file:edu.uga.cs.clickminer.test.BrowserEngineTest.java

License:Open Source License

/**
 * <p>browserEngineTest_7.</p>
 *//*from  w  ww .j  a v a2 s.c o m*/
public static void browserEngineTest_7() {
    RemoteWebDriver wdriver = new FirefoxDriver();
    ProxyClient pc = new ProxyClient("127.0.0.1", 8888);
    BrowserEngine bengine = new BrowserEngine(pc, wdriver);

    wdriver.get("http://docs.oracle.com/javase/6/docs/api/");
    bengine.openUrlInNewWindow("http://www.google.com");
}

From source file:edu.uga.cs.clickminer.test.WindowStateTest.java

License:Open Source License

/**
 * <p>windowStateTest_1.</p>
 *
 * @throws java.lang.InterruptedException if any.
 *//*ww w . ja v  a2s. c om*/
public static void windowStateTest_1() throws InterruptedException {
    WebDriver wdriver = new FirefoxDriver();
    wdriver.get("http://www.google.com");
    WindowState bstate = new WindowState(null, wdriver, wdriver.getWindowHandle());

    Thread.sleep(2000); // not the best way to do this, but quick and dirty
    System.out.println(bstate.getPageHash());
}

From source file:edu.umd.cs.guitar.model.WebApplication.java

License:Open Source License

/**
 * @param rootURL
 */
public WebApplication(String rootURL) {
    this(rootURL, new FirefoxDriver());
}

From source file:edu.umd.cs.guitar.replayer.WebJUnitReplayer.java

License:Open Source License

/**
 * The main method to run the replayer/*from  ww  w .  jav  a  2s .  c om*/
 * 
 * @throws Exception
 * @throws GException
 */
@Test
final public void execute() throws GException, Exception {
    setupEnvironmentVariables();
    if (this.gui == null || this.efg == null || this.testcase == null || this.url == null)
        throw new MissingArgumentExeception();

    replayer = new Replayer(this.testcase, this.gui, this.efg);

    this.driver = new FirefoxDriver();
    GReplayerMonitor monitor = new WebReplayerMonitor();
    replayer.setMonitor(monitor);

    // setup the replayer
    setUp();

    // Execute test case
    try {
        replayer.execute();
    } catch (org.openqa.selenium.StaleElementReferenceException e) {
        GUITARLog.log.error(ComponentNotFound.class.getName());
        //         throw new ComponentNotFound();
    }

    // cleanup the replayer
    cleanUp();

}

From source file:edu.umd.cs.guitar.replayer.WebReplayerMonitor.java

License:Open Source License

@Override
public void setUp() {
    driver = new FirefoxDriver();

    handler = new WebWindowHandler(driver);
    handler.setUp();
}

From source file:edu.umd.cs.guitar.ripper.WebApplicationTest.java

License:Open Source License

@Test
public void testConnectFireFox() {
    String URL = "http://www.google.com/analytics/";
    WebDriver driver = new FirefoxDriver();
    driver.get(URL);/*from   ww w . j  a va2s  .  c o  m*/
    System.out.println("DONE");
}

From source file:edu.umd.cs.guitar.simple.PageNotFoundTest.java

License:Open Source License

@Test
public void testPageNotFound() {

    WebDriver driver;//from   w ww  . j  a v a2  s. c om
    driver = new FirefoxDriver();
    WebWindowManager wwm = WebWindowManager.getInstance(driver);
    wwm.createNewWindow(PAGENOTFOUND_URL);
    System.out.println(driver.getTitle());
    System.out.println(driver.getWindowHandles().size());
}

From source file:edu.umd.cs.guitar.WebWindowManagerTest.java

License:Open Source License

@Test
@Ignore/*  w  ww .  j a va 2s  .c o m*/
public void testCreateWindow() {
    System.out.println("testCreateWindow");
    WebDriver driver = new FirefoxDriver();
    //      driver.get("http://www.google.com/analytics/");
    WebWindowManager wwh = WebWindowManager.getInstance(driver);
    System.out.println(driver.getWindowHandle());

    wwh.createNewWindow("http://www.goolge.com");
    wwh.createNewWindow("http://www.goolge.com/analytics");
    System.out.println(driver.getWindowHandle());
}

From source file:edu.umd.cs.guitar.WebWindowManagerTest.java

License:Open Source License

@Test
public void testCreateMultiWindows() {
    WebDriver driver = new FirefoxDriver();
    WebWindowManager wwh;/*ww  w  .j av  a 2 s .  c o  m*/
    wwh = WebWindowManager.getInstance(driver);

    wwh.createNewWindow("http://www.goolge.com");
    wwh.createNewWindow("http://www.goolge.com/analytics");
    wwh = WebWindowManager.getInstance(driver);

    wwh.createNewWindow("http://www.goolge.com");
    wwh.createNewWindow("http://www.goolge.com/analytics");

}

From source file:edu.usc.cs.ir.selenium.handler.GlocktalkBasic.java

License:Apache License

public static void main(String[] args) {
    GlocktalkBasic glocktalk = new GlocktalkBasic();
    WebDriver driver = new FirefoxDriver();
    try {// ww  w.j a v a  2 s  . c o  m
        driver.get("http://www.glocktalk.com/forum/general-firearms-forum.82/");
        System.out.println(new String(glocktalk.processDriver(driver).getBytes("UTF-8")));
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        if (driver != null) {
            driver.close();
            driver.quit();
        }
    }
}