Package org.openqa.selenium.support.ui

Examples of org.openqa.selenium.support.ui.WebDriverWait


        List<WebElement> plugins = (List<WebElement>) ((JavascriptExecutor)driver).executeScript(
            "return $(\"td:contains('" + LOCAL_PLUGIN_NAME + "')\").toArray();");
        return plugins.size() > existingPlugins.size();
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 60);
    wait.until(uploaded);

    List<WebElement> plugins = (List<WebElement>) ((JavascriptExecutor)driver).executeScript(
        "return $(\"td:contains('" + LOCAL_PLUGIN_NAME + "')\").toArray();");
    assertEquals(existingPlugins.size() + 1, plugins.size());
  }
View Full Code Here


        List<WebElement> plugins = (List<WebElement>) ((JavascriptExecutor)driver).executeScript(
            "return $(\"td:contains('" + REMOTE_PLUGIN_NAME + "')\").toArray();");
        return plugins.size() > existingPlugins.size();
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 60);
    wait.until(uploaded);

    List<WebElement> plugins = (List<WebElement>) ((JavascriptExecutor)driver).executeScript(
        "return $(\"td:contains('" + REMOTE_PLUGIN_NAME + "')\").toArray();");
    assertEquals(existingPlugins.size() + 1, plugins.size());
  }
View Full Code Here

        public Boolean apply(WebDriver driver) {
          WebElement notification = driver.findElements(By.id("notification")).get(0);
          return notification.getText().equals("Plugin Deleted");
        }
      };
      WebDriverWait wait = new WebDriverWait(driver, 10);
      wait.until(isDeleted);
      deleteLinks = (List<WebElement>) ((JavascriptExecutor)driver).executeScript(
          "return $(\"a:contains('Delete')\").toArray()");
    }

    driver.navigate().refresh();
View Full Code Here

        PageFactory.initElements(new DefaultElementLocatorFactory(chart), this);
        this.driver = driver;
        this.chart = chart;

        int waitTimeoutInSeconds = 15;
        wait = new WebDriverWait(driver, waitTimeoutInSeconds, 100);
        performAction = new Actions(driver);
    }
View Full Code Here

    Thread.sleep(1000);
   
//    �����ť
    dr.findElement(By.id("btn")).click();
   
    (new WebDriverWait(dr, 10)).until(new ExpectedCondition<Boolean>() {
        public Boolean apply(WebDriver d) {
                    return d.findElement(By.className("label")).isDisplayed();
                }
      });
           
View Full Code Here

    dr.get(filePath);
    Thread.sleep(1000);
   
    dr.findElement(By.linkText("Link1")).click();
   
    (new WebDriverWait(dr, 10)).until(new ExpectedCondition<Boolean>(){
      public Boolean apply(WebDriver d){
        return d.findElement(By.id("dropdown1")).isDisplayed();
      }
    } );
   
View Full Code Here

   
//    ��λtext��watir-webdriver�������˵�
//    ������ʾ�����˵�
    dr.findElement(By.linkText("Info")).click();
   
    (new WebDriverWait(dr, 10)).until(new ExpectedCondition<Boolean>() {
      public Boolean apply(WebDriver d){
        return d.findElement(By.className("dropdown-menu")).isDisplayed();
      }
    });
   
View Full Code Here

    Thread.sleep(1000);
   
//    �򿪶Ի���
    dr.findElement(By.id("show_modal")).click();
   
    (new WebDriverWait(dr, 10)).until(
        new ExpectedCondition<Boolean>() {
                    public Boolean apply(WebDriver d) {
                        return d.findElement(By.id("myModal")).isDisplayed();
                    }
                }
View Full Code Here

     * We need to wait for the script result, especially after clicking Save & View (looks like Selenium is not always
     * waiting for the scripts to be loaded).
     */
    private void waitForScriptResult()
    {
        new WebDriverWait(getDriver(), getUtil().getTimeout()).until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                return StringUtils.equals("script active", driver.getTitle());
View Full Code Here

     * NOTE: Normally we shoudn't need to use this method, i.e. we should be able to assert the source page directly
     * because Selenium should wait until the page is loaded but this doesn't happen all the time for some reason..
     */
    private void waitForPageSourceContains(final String text)
    {
        new WebDriverWait(getDriver(), getUtil().getTimeout()).until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                return StringUtils.contains(getDriver().getPageSource(), text);
View Full Code Here

TOP

Related Classes of org.openqa.selenium.support.ui.WebDriverWait

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.