StartInstaller works. Debugging logout.

This commit is contained in:
Dirk Jahnke 2019-07-27 00:17:26 +02:00
parent a509166cfa
commit cf5579d82b
2 changed files with 7 additions and 6 deletions

View File

@ -93,11 +93,9 @@ public class BasicTest {
@Test @Test
public void verifyLogout() { public void verifyLogout() {
WebElement logoutButton = wait.until(ExpectedConditions.elementToBeClickable(By.name("doLogin")));
String frameObenName = "oben"; String frameObenName = "oben";
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName)); wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName));
FredlTestHelper.printPageSource();
} }
} }

View File

@ -43,7 +43,7 @@ public class StartInstaller {
String getTitle = driver.getTitle(); String getTitle = driver.getTitle();
System.out.println("Page title: " + getTitle); System.out.println("Page title: " + getTitle);
FredlTestHelper.printPageSource(); // FredlTestHelper.printPageSource();
if (FredlTestHelper.elementExistsByXpath("//table[@class='loginall']")) { if (FredlTestHelper.elementExistsByXpath("//table[@class='loginall']")) {
// Login page shown, thus we do not need to start the installer // Login page shown, thus we do not need to start the installer
@ -55,9 +55,12 @@ public class StartInstaller {
Assert.assertEquals(installerLink.getText(), expectedInstallerLinkText); Assert.assertEquals(installerLink.getText(), expectedInstallerLinkText);
installerLink.click(); 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();
} }
} }