Debugging login

This commit is contained in:
Dirk Jahnke 2019-07-25 19:13:41 +02:00
parent 12491e736a
commit 6cc5f524e8
1 changed files with 5 additions and 4 deletions

View File

@ -81,9 +81,6 @@ public class BasicTest {
String expectedTitle = "FreDL"; String expectedTitle = "FreDL";
wait.until(ExpectedConditions.titleIs(expectedTitle)); wait.until(ExpectedConditions.titleIs(expectedTitle));
body = driver.getPageSource();
System.out.println("HTML: " + body);
//driver.switchTo().frame("oben"); //driver.switchTo().frame("oben");
String frameObenName = "oben"; String frameObenName = "oben";
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName));
@ -96,7 +93,11 @@ public class BasicTest {
System.out.println("Version info found: " + versionInfo); System.out.println("Version info found: " + versionInfo);
System.out.println("User info found: " + userInfo); 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(); String welcomeMessage = driver.findElement(By.xpath("//body/h1")).getText();
System.out.println("Welcome message is: " + welcomeMessage); System.out.println("Welcome message is: " + welcomeMessage);
Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL"); Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL");