diff --git a/src/test/java/BasicTest.java b/src/test/java/BasicTest.java index ac3ab41..9b7959d 100644 --- a/src/test/java/BasicTest.java +++ b/src/test/java/BasicTest.java @@ -81,9 +81,6 @@ public class BasicTest { String expectedTitle = "FreDL"; wait.until(ExpectedConditions.titleIs(expectedTitle)); - body = driver.getPageSource(); - System.out.println("HTML: " + body); - //driver.switchTo().frame("oben"); String frameObenName = "oben"; wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); @@ -96,7 +93,11 @@ public class BasicTest { System.out.println("Version info found: " + versionInfo); System.out.println("User info found: " + userInfo); - driver.switchTo().frame("rechts"); + String frameRechtsName = "rechts"; + driver.switchTo().frame(frameRechtsName); + body = driver.getPageSource(); + System.out.println("HTML: " + body); + String welcomeMessage = driver.findElement(By.xpath("//body/h1")).getText(); System.out.println("Welcome message is: " + welcomeMessage); Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL");