diff --git a/src/test/java/org/fremo/fredl/test/BasicTest.java b/src/test/java/org/fremo/fredl/test/BasicTest.java index d2a70a1..c38089c 100644 --- a/src/test/java/org/fremo/fredl/test/BasicTest.java +++ b/src/test/java/org/fremo/fredl/test/BasicTest.java @@ -64,6 +64,7 @@ public class BasicTest { // FredlTestHelper.printPageSource(driver); + driver.switchTo().defaultContent(); String frameObenName = "oben"; wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); @@ -76,7 +77,7 @@ public class BasicTest { System.out.println("User info found: " + userInfo); Assert.assertEquals(userInfo, expectedUserInfo); - driver.switchTo().parentFrame(); + driver.switchTo().defaultContent(); String frameRechtsName = "rechts"; driver.switchTo().frame(frameRechtsName); @@ -88,11 +89,12 @@ public class BasicTest { Assert.assertEquals(welcomeMessage, expectedWelcomeMessage); // we leave our tests always with having the driver located to the top frame - driver.switchTo().parentFrame(); + driver.switchTo().defaultContent(); } @Test public void verifyExistenceOfMainMenuButtons() { + driver.switchTo().defaultContent(); driver.switchTo().frame("oben"); // Verify existence of menu buttons Assert.assertEquals(FredlTestHelper.elementExistsById("admin-menu-button"), true); @@ -106,7 +108,8 @@ public class BasicTest { Assert.assertEquals(FredlTestHelper.elementExistsById("calendar-menu-button"), true); 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().parentFrame(); + Assert.assertEquals(FredlTestHelper.elementExistsById("logout-menu-button"), true); + driver.switchTo().defaultContent(); } @Test