From 3fccdc8c571c617589d353f381610fcc4755a9c8 Mon Sep 17 00:00:00 2001 From: AnkitCLI Date: Sat, 7 Dec 2024 11:44:45 +0530 Subject: [PATCH] close pipeline logs fix --- src/main/java/io/cdap/e2e/pages/actions/CdfLogActions.java | 2 +- src/main/java/io/cdap/e2e/pages/locators/CdfLogLocators.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/cdap/e2e/pages/actions/CdfLogActions.java b/src/main/java/io/cdap/e2e/pages/actions/CdfLogActions.java index f3f25a829..d63e2af8b 100644 --- a/src/main/java/io/cdap/e2e/pages/actions/CdfLogActions.java +++ b/src/main/java/io/cdap/e2e/pages/actions/CdfLogActions.java @@ -100,6 +100,6 @@ public static void verifyPipelineFailedLogIsShownWithErrorLevel() { * Click on the close button(x) for the Logs page */ public static void closeLogs() { - ElementHelper.clickOnElement(CdfLogLocators.closeLogs); + ElementHelper.clickIfDisplayed(CdfLogLocators.closeLogs); } } diff --git a/src/main/java/io/cdap/e2e/pages/locators/CdfLogLocators.java b/src/main/java/io/cdap/e2e/pages/locators/CdfLogLocators.java index 0079b54d4..833bf4b37 100644 --- a/src/main/java/io/cdap/e2e/pages/locators/CdfLogLocators.java +++ b/src/main/java/io/cdap/e2e/pages/locators/CdfLogLocators.java @@ -46,9 +46,7 @@ public class CdfLogLocators { @FindBy(xpath = "//*[contains(text(),'Pipeline') and contains(text(),'succeeded')]") public static WebElement validateSucceeded; - - @FindBy(xpath = "//*[contains(@class, 'close')]") - public static WebElement closeLogs; + public static By closeLogs = By.xpath("//*[contains(@class, 'close')]"); public static WebElement getPipelineStatusFromLogs(String status) { return SeleniumDriver.getDriver()