From b4205dcb4d9e98e3f24cab48c5366c861951b986 Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Sat, 27 Jul 2019 19:09:25 +0200 Subject: [PATCH] Debug . --- src/test/java/org/fremo/fredl/test/BasicTest.java | 3 ++- src/test/java/org/fremo/fredl/test/FredlTestHelper.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/fremo/fredl/test/BasicTest.java b/src/test/java/org/fremo/fredl/test/BasicTest.java index d644aa2..50c2482 100644 --- a/src/test/java/org/fremo/fredl/test/BasicTest.java +++ b/src/test/java/org/fremo/fredl/test/BasicTest.java @@ -116,7 +116,8 @@ public class BasicTest { public void verifyLogout() { driver.switchTo().defaultContent(); FredlTestHelper.printPageSource(); - driver.switchTo().frame("oben"); + String frameObenName = "oben"; + driver.switchTo().frame(frameObenName); driver.findElement(By.id("logout-menu-button")).click(); diff --git a/src/test/java/org/fremo/fredl/test/FredlTestHelper.java b/src/test/java/org/fremo/fredl/test/FredlTestHelper.java index eac78e9..bbfbe84 100644 --- a/src/test/java/org/fremo/fredl/test/FredlTestHelper.java +++ b/src/test/java/org/fremo/fredl/test/FredlTestHelper.java @@ -22,24 +22,24 @@ public class FredlTestHelper { } public static boolean elementExistsByXpath(String xpath) { - System.out.println("elementExistsByXpath for " + xpath); driver.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS); boolean exists = driver.findElements(By.xpath(xpath)).size() != 0; + System.out.println("elementExistsByXpath for " + xpath + " = " + exists); driver.manage().timeouts().implicitlyWait(implicitTimeoutMilliseconds, TimeUnit.MILLISECONDS); return exists; } public static boolean elementExistsById(String id) { - System.out.println("elementExistsById for " + id); driver.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS); boolean exists = driver.findElements(By.id(id)).size() != 0; + System.out.println("elementExistsById for " + id + " = " + exists); driver.manage().timeouts().implicitlyWait(implicitTimeoutMilliseconds, TimeUnit.MILLISECONDS); return exists; } public static void skipConsentCookiePage() { if (FredlTestHelper.elementExistsById("privacy-cookie-statement")) { - System.out.println("Cookies consent page is shown"); + System.out.println("Cookies consent page is shown -- accepting"); WebElement consentButton = driver.findElement(By.id("opt-in-button-allow")); consentButton.click(); }