Debug ........

This commit is contained in:
Dirk Jahnke 2019-07-27 19:49:14 +02:00
parent 27d564a963
commit 1506e057b3
1 changed files with 11 additions and 9 deletions

View File

@ -94,11 +94,12 @@ public class BasicTest {
@Test
public void verifyExistenceOfMainMenuButtons() {
//driver.switchTo().defaultContent();
driver.switchTo().frame(0);
driver.switchTo().defaultContent();
//driver.switchTo().frame(0);
FredlTestHelper.printPageSource();
Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true);
driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt("oben"));
//Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true);
//driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
// Verify existence of menu buttons
Assert.assertEquals(FredlTestHelper.elementExistsById("admin-menu-button"), true);
Assert.assertEquals(FredlTestHelper.elementExistsById("loco-menu-button"), true);
@ -112,15 +113,16 @@ public class BasicTest {
Assert.assertEquals(FredlTestHelper.elementExistsById("idman-menu-button"), true);
Assert.assertEquals(FredlTestHelper.elementExistsById("lola-menu-button"), true);
Assert.assertEquals(FredlTestHelper.elementExistsById("logout-menu-button"), true);
driver.switchTo().defaultContent();
//driver.switchTo().defaultContent();
}
@Test
public void verifyLogout() {
//driver.switchTo().defaultContent();
driver.switchTo().frame(0);
Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true);
driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
driver.switchTo().defaultContent();
//driver.switchTo().frame(0);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt("oben"));
//Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true);
//driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
driver.findElement(By.id("logout-menu-button")).click();
Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//input[@name='doLogin']"), true);
}