Examples of until()


Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

        WebElement notification = driver.findElements(By.id("notification")).get(0);
        return notification.getText().equals("Configuration Deleted");
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 10);
    wait.until(isDeleted);
  }

  private void runConfigurationAndViewResults() {
    openConfiguration();
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li:contains('running')\")[0];");
        return running != null;
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 10);
    wait.until(isRunning);

    ExpectedCondition<Boolean> isComplete = new ExpectedCondition<Boolean>() {
      public Boolean apply(WebDriver driver) {
        WebElement success = (WebElement) ((JavascriptExecutor)driver).executeScript(
            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li > span:contains('" + CONFIG_NAME + "')\").parent().find(\"i:contains('success')\")[0];");
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li > span:contains('" + CONFIG_NAME + "')\").parent().find(\"i:contains('success')\")[0];");
        return success != null;
      }
    };
    wait = new WebDriverWait(driver, 60);
    wait.until(isComplete);

    List<WebElement> crawlHistoryLink = driver.findElements(By.linkText("Crawl History"));
    followLink(crawlHistoryLink.get(0));

    WebElement crawlLink = (WebElement) ((JavascriptExecutor)driver).executeScript(
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

            "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

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

            "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

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

          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

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

    private static WebDriver driver = BasePage.driver;

    public static void waitForElementPresent(String xpath) {
        WebDriverWait wait = new WebDriverWait(driver, 10);
        WebElement element = wait.until(
                ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));
    }

    public static boolean isElementPresent(String xpath) {
        return driver.findElements(By.xpath(xpath)).size() > 0;
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

   */
  public boolean menuUsuarioVisivel() {
    boolean resultado = false;
    try {
      WebDriverWait wait = new WebDriverWait(Webdriver.obterInstancia(), 15);
      wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userSideNavBar")));
      resultado = true;
    } catch (Exception e) {
      resultado = false;
    }
    return resultado;
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

    WebDriverWait wait = new WebDriverWait(driver, getTimeout());
    // wait for Login, but we are not gonna click it testing AUTOACCEPT works.
    // TODO fix assumption that all sites have a direct Login page, but not all do. 
    if (loginLoadedLinkText != null &&  !loginLoadedLinkText.equals(""))
    {
      wait.until(ExpectedConditions.elementToBeClickable(By.linkText(loginLoadedLinkText)));
    }
    else
    {
      wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("/html")));
    }
View Full Code Here

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()

    {
      wait.until(ExpectedConditions.elementToBeClickable(By.linkText(loginLoadedLinkText)));
    }
    else
    {
      wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("/html")));
    }

    screenshot(); // of given loginUrl
   
    // various in page login pop-ups are detected by MP and can be submitted without clicking the link
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.