Skip to content
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鈥檒l 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

Open
benyue1978 opened this issue Dec 4, 2023 · 2 comments
Open

Comments

@benyue1978
Copy link

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

Copy link
Contributor

github-actions bot commented Dec 4, 2023

@benyue1978, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented Dec 4, 2023

Would you like to send a PR to improve that section of the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants