Пример #1
1
 public static void testSetUpProgressText(WebDriver driver)
         throws InterruptedException {
     WebDriverWait wait = new WebDriverWait(driver, WAIT_TIME);
     String str = wait.until(
             ExpectedConditions
                     .presenceOfElementLocated(SETUP_PROGRESS_TEXT))
             .getText();
     Assert.assertEquals(str, "Setup Progress:");
 }
 private WebElement findElement(final By locator) {
   (new WebDriverWait(driver, 30, 1000))
       .until(ExpectedConditions.presenceOfElementLocated(locator));
   (new WebDriverWait(driver, 30, 1000))
       .until(ExpectedConditions.visibilityOfElementLocated(locator));
   WebElement element = driver.findElement(locator);
   if (element.isEnabled() == false)
     ((JavascriptExecutor) driver).executeScript("arguments[0].disabled = false", element);
   return element;
 }