From f05700b7339cb9fedbfe0da32f1d3bc74e76470f Mon Sep 17 00:00:00 2001 From: vculea Date: Mon, 26 Aug 2024 13:38:53 +0300 Subject: [PATCH] possible fix --- src/main/java/com/sdl/selenium/web/XPathBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sdl/selenium/web/XPathBuilder.java b/src/main/java/com/sdl/selenium/web/XPathBuilder.java index b6c11fa8..4466d2bb 100644 --- a/src/main/java/com/sdl/selenium/web/XPathBuilder.java +++ b/src/main/java/com/sdl/selenium/web/XPathBuilder.java @@ -1067,7 +1067,7 @@ public void addTextInPath(List selectors, String text, String pattern, L String escapeQuotesText = Utils.getEscapeQuotesText(strings[i]); if (searchTextType.contains(SearchType.CONTAINS_ALL_CHILD_NODES)) { if (searchTextType.contains(SearchType.CASE_INSENSITIVE)) { - if (escapeQuotesText.equals("'") || escapeQuotesText.equals(".")) { + if (strings[i].equals("'") || strings[i].equals(".")) { strings[i] = "count(*//text()[contains(translate(.,'" + strings[i].replaceAll("CONCAT\\(", "concat(") + "',\\'" + strings[i] + "'\\),\\'" + strings[i] + "'\\)]) > 0"; } else { strings[i] = "count(*//text()[contains(translate(.," + escapeQuotesText.toUpperCase().replaceAll("CONCAT\\(", "concat(") + "," + escapeQuotesText.toLowerCase() + ")," + escapeQuotesText.toLowerCase() + ")]) > 0";