Skip to content

Commit

Permalink
possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vculea committed Aug 26, 2024
1 parent 128bd44 commit f05700b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/sdl/selenium/web/XPathBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ public void addTextInPath(List<String> 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";
Expand Down

0 comments on commit f05700b

Please sign in to comment.