Skip to content

Commit

Permalink
fix selector for clicking elements by text
Browse files Browse the repository at this point in the history
  • Loading branch information
abainczyk committed May 19, 2022
1 parent b6dc8f8 commit 92d2276
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected ExecuteResult execute(WebSiteConnector connector) {

final List<WebElement> candidates;
if (tagName == null || tagName.trim().equals("")) {
candidates = root.findElements(By.xpath("//text()[normalize-space() = '" + textWithVariables + "']"));
candidates = root.findElements(By.xpath("//*[text()[normalize-space() = '" + textWithVariables + "']]"));
} else {
candidates = root.findElements(By.tagName(tagName));
}
Expand Down

0 comments on commit 92d2276

Please sign in to comment.