Skip to content

Commit

Permalink
fix: small locator fix for by tag in page element (#3530)
Browse files Browse the repository at this point in the history
due to the missing . character in the xpath, it was not possible to locate nested elements by tag, as the elements were being searched for in document root rather than current node. The applied fix resolves this issue.
  • Loading branch information
fecrol authored Sep 11, 2024
1 parent 6c1b871 commit ee997df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class PageElement {

private static final String BY_NAME_ID_OR_ARIA_LABEL = "css:[id='{0}' i],[name='{0}' i],[data-test='{0}' i],[aria-label='{0}' i]";
private static final String BY_TAG = "xpath://{0}";
private static final String BY_TAG = "xpath:.//{0}";

/**
* Locate an element with a given name.
Expand Down

0 comments on commit ee997df

Please sign in to comment.