Package org.openqa.selenium.firefox

Examples of org.openqa.selenium.firefox.FirefoxDriver$FirefoxAlert


          webDriver = new SafariDriver();
        } else if ("headless".equals(browserName)) {
          HtmlUnitDriver driver = new HtmlUnitDriver(true);
          webDriver = driver;
        } else {
          webDriver = new FirefoxDriver();
        }
      } else {
        DesiredCapabilities cap = null;
        if ("ie".equals(browserName)) {
          cap = DesiredCapabilities.internetExplorer();
View Full Code Here


      }
     
      public static void testGoogleSuggest() throws Exception {
     
          // The Firefox driver supports javascript
          WebDriver driver = new FirefoxDriver();
         
          // Go to the Google Suggest home page
          driver.get("http://www.google.com/webhp?complete=1&hl=en");
         
          // Enter the query string "Cheese"
          WebElement query = driver.findElement(By.name("q"));
          query.sendKeys("Cheese");

          // Sleep until the div we want is visible or 5 seconds is over
          long end = System.currentTimeMillis() + 5000;
          while (System.currentTimeMillis() < end) {
              WebElement resultsDiv = driver.findElement(By.className("gsq_a"));

              // If results have been returned, the results are displayed in a drop down.
              if (resultsDiv.isDisplayed()) {
                break;
              }
          }

          // And now list the suggestions
          List<WebElement> allSuggestions = driver.findElements(By.className("gsq_a"));
         
          for (WebElement suggestion : allSuggestions) {
              System.out.println(suggestion.getText());
          }
       }
View Full Code Here

  private String password;
 
  /** Initialized class properties before excuting this class. */
  @BeforeClass
  public static void initializeClass(){
    driver = new FirefoxDriver();
   
  }
View Full Code Here

        assertTrue("Got title: " + pageTitle, pageTitle.contains("Cheese!"));
    }
   
    public static void testGoogleSuggest() throws Exception {
   
  GoogleSearchSuggestPage googleSuggestPage = new GoogleSearchSuggestPage(new FirefoxDriver());
       
        // Go to the Google Suggest home page: "http://www.google.com/webhp?complete=1&hl=en"
  googleSuggestPage.open()
       
        // Enter the query string "Cheese", and get the list the suggestions
View Full Code Here

  /** Initialized class properties before excuting this class. */
  @BeforeClass
  public static void initializeClass(){
 
    driver = new FirefoxDriver();

   
  }
View Full Code Here

      setDriver(new HtmlUnitDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("firefox")) {
      System.out.println("Using Firefox.");
      setDriver(new FirefoxDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

      System.out.println("Using Chrome");
View Full Code Here

    } else if (Config.inst().BROWSER.equals("firefox")) {

      System.out.println("Using Firefox.");

      driver = new FirefoxDriver();
      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

      System.out.println("Using Chrome");
View Full Code Here

    } else if (Config.BROWSER.equals("firefox")) {

      System.out.println("Using Firefox.");

      driver = new FirefoxDriver();
      selenium = new WebDriverBackedSelenium(driver, Config.TEAMMATES_URL);

    } else if (Config.BROWSER.equals("chrome")) {

      System.out.println("Using Chrome");
View Full Code Here

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

    }
View Full Code Here

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

        return new FirefoxDriver();

    }
View Full Code Here

TOP

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

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.