Open Convalytics opened 2 months ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | f2c5394fce604bafd118e4a0f20001f16be635d7 |
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
โฑ๏ธ Estimated effort to review: 1 ๐ตโชโชโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก No key issues to review |
Category | Suggestion | Score |
Enhancement |
Add a concrete example to illustrate the misuse of XPATH in an ID selector___ **Provide a specific example of how an XPATH value might be incorrectly used in an IDselector to illustrate the point more clearly.** [website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md [18]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1895/files#diff-d8713bd094ba75ca3ce0659e13a3158956619dcbb35d5ede1743e90dbee52f9aR18-R18) ```diff -This issue can also arise if you've placed an XPATH value as a parameter to an ID selector. +This issue can also arise if you've placed an XPATH value as a parameter to an ID selector. For example, using `driver.find_element(By.ID, "//input[@name='username']")` instead of `driver.find_element(By.XPATH, "//input[@name='username']")`. ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: The suggestion provides a clear example that enhances understanding of the issue, improving the documentation's clarity and usefulness. However, it addresses a minor enhancement rather than a critical issue. | 7 |
Thank you for the contribution @Convalytics! Before we can accept the PR a few things must be done first:
User description
Updated Invalid Selector Exception to note that it can also be caused when inputting an xpath value into an ID-based selector.
Thanks for contributing to the Selenium site and documentation! A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines. Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
Additional error case noting that Invalid Selector Exception can also happen if you use XPATH with an ID selector.
Motivation and Context
I had this issue today because I changed my code to search by XPATH instead of ID, and I forgot to change the type from By.ID to By.XPATH.
Types of changes
Checklist
PR Type
documentation
Description
Changes walkthrough ๐
_index.en.md
Update documentation for Invalid Selector Exception causes
website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md