-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Xpath starting with .
not picked up by xpath heuristic
#2197
Comments
The "working with selectors" section elaborates on rules that we use to parse selectors. References microsoft#2197
@Georgegriff Even though we can hot-fix this particular case, the general problem of differentiating between xpath and css is not an easy one and looks like a slippery slope to me. So we'd rather be conservative and stick with a simple-and-clear rule we have today:
Honestly, it wasn't that easy to find the rules for our selectors in the docs - I've updated docs to have clear references (#2213). Hopefully it'll make life easier. |
That's fair, in the framework this came from (CodeceptJS) they have a different heuristic for figuring out xpath so can fix over there rather than here for our user cases thanks for responding |
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
It tries to use the css locator strategy instead.
I'm guessing this might be a hard problem to solve given the semantics.
As you can see this is a valid xpath
The text was updated successfully, but these errors were encountered: