diff --git a/src/test/java/org/fremo/fredl/test/BasicTest.java b/src/test/java/org/fremo/fredl/test/BasicTest.java index 86f3338..8db916e 100644 --- a/src/test/java/org/fremo/fredl/test/BasicTest.java +++ b/src/test/java/org/fremo/fredl/test/BasicTest.java @@ -95,8 +95,8 @@ public class BasicTest { @Test public void verifyExistenceOfMainMenuButtons() { driver.switchTo().defaultContent(); - String frameObenName = "oben"; - driver.switchTo().frame(frameObenName); + FredlTestHelper.printPageSource(); + 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); @@ -116,12 +116,9 @@ public class BasicTest { @Test public void verifyLogout() { driver.switchTo().defaultContent(); - FredlTestHelper.printPageSource(); 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); } }