Added ExpectedConditions import

This commit is contained in:
Dirk Jahnke 2019-07-25 13:20:10 +02:00
parent 16db4f13ee
commit 0c2f207c7b
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@ import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
//import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@ -37,7 +37,7 @@ public class BasicTest {
//driver.findElement(By.xpath("//input[@name='login']")).sendKeys("system");
//driver.findElement(By.xpath("//input[@name='password']")).sendKeys("system");
//driver.findElement(By.xpath("//input[@name='doLogin']")).submit();
WebDriverWait waitForLoginDone = new WebDriverWait(browser, 15);
WebDriverWait waitForLoginDone = new WebDriverWait(driver, 15);
//waitForLoginDone.until(ExpectedConditions.ElementIsVisible(By.xpath("//input[@class='menu'][0]"));
waitForLoginDone.until(ExpectedConditions.ElementIsVisible(By.classname("menu")));
driver.switchTo().frame("oben");