Debug .....

This commit is contained in:
Dirk Jahnke 2019-07-27 19:33:04 +02:00
parent ebf44463e0
commit 83f5e9feba
1 changed files with 2 additions and 5 deletions

View File

@ -95,8 +95,8 @@ public class BasicTest {
@Test @Test
public void verifyExistenceOfMainMenuButtons() { public void verifyExistenceOfMainMenuButtons() {
driver.switchTo().defaultContent(); driver.switchTo().defaultContent();
String frameObenName = "oben"; FredlTestHelper.printPageSource();
driver.switchTo().frame(frameObenName); driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
// Verify existence of menu buttons // Verify existence of menu buttons
Assert.assertEquals(FredlTestHelper.elementExistsById("admin-menu-button"), true); Assert.assertEquals(FredlTestHelper.elementExistsById("admin-menu-button"), true);
Assert.assertEquals(FredlTestHelper.elementExistsById("loco-menu-button"), true); Assert.assertEquals(FredlTestHelper.elementExistsById("loco-menu-button"), true);
@ -116,12 +116,9 @@ public class BasicTest {
@Test @Test
public void verifyLogout() { public void verifyLogout() {
driver.switchTo().defaultContent(); driver.switchTo().defaultContent();
FredlTestHelper.printPageSource();
Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true); Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//frame[@name='oben']"), true);
driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']"))); driver.switchTo().frame(driver.findElement(By.xpath("//frame[@name='oben']")));
driver.findElement(By.id("logout-menu-button")).click(); driver.findElement(By.id("logout-menu-button")).click();
Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//input[@name='doLogin']"), true); Assert.assertEquals(FredlTestHelper.elementExistsByXpath("//input[@name='doLogin']"), true);
} }
} }