From 31a3fb156f2b634fd9d7bac077843f434c1dec4c Mon Sep 17 00:00:00 2001 From: testing-ninja <147162706+testing-ninja@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:04:12 +0530 Subject: [PATCH] Update GetLinkStatus.java Commenting the functionality inside the catch block, will make the program execute without any failure in between as it would throw the error for "Cannot invoke "String.length()" because "spec" is null" because in some cases the URL can be blank. such declaration is also treated like an invalid link. --- .../src/com/selenium/masterpart1/GetLinkStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirstSeleniumProject/src/com/selenium/masterpart1/GetLinkStatus.java b/FirstSeleniumProject/src/com/selenium/masterpart1/GetLinkStatus.java index 5229f3e..2939cbd 100644 --- a/FirstSeleniumProject/src/com/selenium/masterpart1/GetLinkStatus.java +++ b/FirstSeleniumProject/src/com/selenium/masterpart1/GetLinkStatus.java @@ -29,7 +29,7 @@ public static void verifyLink(String linkString) { } catch (Exception e) { - e.printStackTrace(); + //e.printStackTrace(); } }