From cf5579d82b7055b649d0ff64d7734ac6eaf73591 Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Sat, 27 Jul 2019 00:17:26 +0200 Subject: [PATCH] StartInstaller works. Debugging logout. --- src/test/java/org/fremo/fredl/test/BasicTest.java | 4 +--- src/test/java/org/fremo/fredl/test/StartInstaller.java | 9 ++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/fremo/fredl/test/BasicTest.java b/src/test/java/org/fremo/fredl/test/BasicTest.java index ace576c..b695d9f 100644 --- a/src/test/java/org/fremo/fredl/test/BasicTest.java +++ b/src/test/java/org/fremo/fredl/test/BasicTest.java @@ -93,11 +93,9 @@ public class BasicTest { @Test public void verifyLogout() { - WebElement logoutButton = wait.until(ExpectedConditions.elementToBeClickable(By.name("doLogin"))); - String frameObenName = "oben"; wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); - + FredlTestHelper.printPageSource(); } } diff --git a/src/test/java/org/fremo/fredl/test/StartInstaller.java b/src/test/java/org/fremo/fredl/test/StartInstaller.java index 326a441..8da0dc8 100644 --- a/src/test/java/org/fremo/fredl/test/StartInstaller.java +++ b/src/test/java/org/fremo/fredl/test/StartInstaller.java @@ -43,7 +43,7 @@ public class StartInstaller { String getTitle = driver.getTitle(); System.out.println("Page title: " + getTitle); - FredlTestHelper.printPageSource(); + // FredlTestHelper.printPageSource(); if (FredlTestHelper.elementExistsByXpath("//table[@class='loginall']")) { // Login page shown, thus we do not need to start the installer @@ -55,9 +55,12 @@ public class StartInstaller { Assert.assertEquals(installerLink.getText(), expectedInstallerLinkText); installerLink.click(); - FredlTestHelper.printPageSource(); + // FredlTestHelper.printPageSource(); - //WebElement appLink = wait.until(ExpectedConditions.elementToBeClickable(By.name("doLogin"))); + String expectedAppLinkText = "Go to application"; + WebElement appLink = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='/']"))); + Assert.assertEquals(appLink.getText(), expectedAppLinkText); + appLink.click(); } }