From 07e7c4fd32b88431fc38b5f5c783d22effee59f4 Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Thu, 25 Jul 2019 19:51:00 +0200 Subject: [PATCH] Login procedure completed --- src/test/java/BasicTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/BasicTest.java b/src/test/java/BasicTest.java index a1a4d89..1373e97 100644 --- a/src/test/java/BasicTest.java +++ b/src/test/java/BasicTest.java @@ -81,15 +81,15 @@ public class BasicTest { String expectedTitle = "FreDL"; wait.until(ExpectedConditions.titleIs(expectedTitle)); - body = driver.getPageSource(); - System.out.println("HTML: " + body); + //body = driver.getPageSource(); + //System.out.println("HTML: " + body); //driver.switchTo().frame("oben"); String frameObenName = "oben"; wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); - body = driver.getPageSource(); - System.out.println("HTML: " + body); + //body = driver.getPageSource(); + //System.out.println("HTML: " + body); String versionInfo = driver.findElement(By.xpath("//table[1]/tbody/tr/td[1]/b")).getText(); String userInfo = driver.findElement(By.xpath("//table[1]/tbody/tr/td[3]")).getText(); @@ -99,14 +99,14 @@ public class BasicTest { Assert.assertEquals(userInfo, expectedUserInfo); driver.switchTo().parentFrame(); - //driver.switchTo().frame(1); // nested frameset String frameRechtsName = "rechts"; driver.switchTo().frame(frameRechtsName); - body = driver.getPageSource(); - System.out.println("HTML: " + body); + //body = driver.getPageSource(); + //System.out.println("HTML: " + body); String welcomeMessage = driver.findElement(By.xpath("//body/h1")).getText(); + String expectedWelcomeMessage = "Willkommen bei FreDL"; System.out.println("Welcome message is: " + welcomeMessage); - Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL"); + Assert.assertEquals(welcomeMessage, expectedWelcomeMessage); } }