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";