From 0c2f207c7b523f800763bc481fdaa5896755f495 Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Thu, 25 Jul 2019 13:20:10 +0200 Subject: [PATCH] Added ExpectedConditions import --- src/test/java/BasicTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/BasicTest.java b/src/test/java/BasicTest.java index 705a2b9..b98340f 100644 --- a/src/test/java/BasicTest.java +++ b/src/test/java/BasicTest.java @@ -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");