Retry using name but added wait after submit/click
This commit is contained in:
parent
96c734e2eb
commit
9abc5324ff
|
@ -31,9 +31,15 @@ public class BasicTest {
|
||||||
@Test
|
@Test
|
||||||
public void verifyLoginAsSystemUser() {
|
public void verifyLoginAsSystemUser() {
|
||||||
driver.navigate().to(URL);
|
driver.navigate().to(URL);
|
||||||
driver.findElement(By.xpath("//input[@name='login']")).sendKeys("system");
|
driver.findElement(By.name("login")).sendKeys("system");
|
||||||
driver.findElement(By.xpath("//input[@name='password']")).sendKeys("system");
|
driver.findElement(By.name("password")).sendKeys("system");
|
||||||
driver.findElement(By.xpath("//input[@name='doLogin']")).submit();
|
driver.findElement(By.name("doLogin")).click();
|
||||||
|
//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);
|
||||||
|
//waitForLoginDone.until(ExpectedConditions.ElementIsVisible(By.xpath("//input[@class='menu'][0]"));
|
||||||
|
waitForLoginDone.until(ExpectedConditions.ElementIsVisible(By.classname("menu"));
|
||||||
driver.switchTo().frame("oben");
|
driver.switchTo().frame("oben");
|
||||||
String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText();
|
String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText();
|
||||||
String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText();
|
String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText();
|
||||||
|
|
Loading…
Reference in New Issue