-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[🚀 Feature]: mention the usage of By.xpath in findElement chain #1539
Comments
@benyue1978, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
After troubleshooting the issue, please add the Thank you! |
Would you like to send a PR to improve that section of the documentation? |
added feature 1539 to each translation Co-authored-by: Diego Molina <[email protected]> [deploy site]
added feature 1539 to each translation Co-authored-by: Diego Molina <[email protected]> [deploy site] 8a57ce0
Covered by commit 61c311f |
Feature and motivation
Took me quite some time to figure out that I need to use relative path in the xpath expression to chain a By.xpath in the locator.
xpathExpression = ".//b" // this one works
xpathExpression = "//b" // it will find all elements from the root of DOM
It may worth mentioning in the doc
https://www.selenium.dev/documentation/webdriver/elements/finders/#evaluating-a-subset-of-the-dom
or
https://www.selenium.dev/documentation/webdriver/elements/finders/#find-elements-from-element
The text was updated successfully, but these errors were encountered: