Package org.openqa.selenium.firefox

Examples of org.openqa.selenium.firefox.FirefoxDriver


  @Test
  public void resgisterEmptyTest() {

    // Setup
    //System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
    WebDriver webDriver = new FirefoxDriver();

    // Exercise
    webDriver.get("http://10.0.55.154:8080/safebuy/registrarAlmacen.html");

    // Verify
    String title = webDriver.getTitle();
    Assert.assertEquals("Dream Live Website Template | Contact :: W3layouts", title);

    // Tear down
    webDriver.close();

  }
View Full Code Here


        // configure it as a desired capability
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(CapabilityType.PROXY, proxy.seleniumProxy());

        FirefoxDriver driver = new FirefoxDriver(capabilities);
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // start capture
        proxy.newHar("twitter.com");

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        // write the har file out
        new PerformanceTiming(driver, proxy.getHar());
        proxy.getHar().writeTo(new File("/tmp/twitter.com.har"));

        driver.close();

    }
View Full Code Here

        // **************************************
        DesiredCapabilities capabilities = new DesiredCapabilities();
        Firebug.configure(new File("."), capabilities);
        // **************************************

        FirefoxDriver driver = new FirefoxDriver(capabilities);
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        //*********************
        JavaScriptErrors.wire(driver);
        //*********************
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        JavaScriptErrors errors = new JavaScriptErrors(driver);
        if (!errors.getErrors().isEmpty()) {
            System.out.println("FOUND ERRORS!");
            for (JavaScriptErrors.JavaScriptError error : errors.getErrors()) {
                System.out.println(error);
            }
        }

        driver.close();

    }
View Full Code Here

        // **************************************
        DesiredCapabilities capabilities = new DesiredCapabilities();
        Firebug.configure(new File("."), capabilities);
        // **************************************

        WebDriver driver = new FirefoxDriver(capabilities);

        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        // **************************************
        Thread.sleep(5000); // chill
        // **************************************

        driver.close();

    }
View Full Code Here

        // configure it as a desired capability
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(CapabilityType.PROXY, proxy.seleniumProxy());

        WebDriver driver = new FirefoxDriver(capabilities);
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // start capture
        proxy.newHar("twitter.com");

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        // write the har file out
        proxy.getHar().writeTo(new File("/tmp/twitter.com.har"));

        driver.close();

    }
View Full Code Here

import java.util.concurrent.TimeUnit;

public class SimpleTest {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        driver.close();
    }
View Full Code Here

  private String baseUrl;

  @Before
  public void setUp() {
    // driver = new InternetExplorerDriver();
    driver = new FirefoxDriver();
    // driver = new ChromeDriver();

    baseUrl = "http://localhost:8080/connectfour/";
  }
View Full Code Here

        if ( StringUtils.contains( seleniumBrowser, "iexplore" ) )
        {
            return new InternetExplorerDriver();
        }
       
        return new FirefoxDriver();

    }
View Full Code Here

        "text/csv,text/plain,application/zip,application/pdf");
    firefoxProfile.setPreference("browser.helperApps.alwaysAsk.force",
        false);
    System.out.println("Saving all attachments to: " + downloadDir);

    driver = new FirefoxDriver(firefoxProfile);
  }
View Full Code Here

        return profile;
    }

    @Override
    protected FirefoxDriver createBrowser() {
        return new FirefoxDriver(new FirefoxBinary(), createProfile(), createCapabilities());
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.firefox.FirefoxDriver

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.