Add locator deprecation warning and additional examples
Selenium 4.0.0 deprecates find_element_by_* methods. This PR makes a handful of edits to address that:
- Add notice to introduction about deprecated methods
- Add table of locator methods to page introduction
- Add additional examples with preferred methods under each locator example
- Add additional XPath browser extensions
- Move and convert inline notes into comments directly beneath relevant code block
- Add relevant alerts/notices as footnotes to improve readability
Note: I did not remove the legacy find_element_by_* locator methods because they do still behave as expected for earlier versions of Selenium, though if used they will print a warning to the console:
DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead.
@baijum @anarang - PR for consideration at your convenience
@anotherkowski thanks for raising the PR. The changes about the deprecation notice and the table look good to me at the top and once at the bottom of the PR. However, I am not sure of the cosmetic changes to the text that you propose, changing '' to ``, there is some inconsistency there.
@anotherkowski Thanks for the PR! Now that I have merged a similar PR #99 So, can you please rebase your PR branch?
Also, the reStructuredText changes should be a separate PR.
Thanks for @anarang for the review!
@anotherkowski thanks for raising the PR. The changes about the deprecation notice and the table look good to me at the top and once at the bottom of the PR. However, I am not sure of the cosmetic changes to the text that you propose, changing '' to ``, there is some inconsistency there.
Absolutely - understood. I will revert them for consistency's sake with the rest of the docs.
Rebased, resolved conflicts, and reverted the rogue `` into " at @anarang's suggestion. I maintained the table at the top of the Locating Elements page, but also preserved the updates made by @dysphere.
Please let me know if there are other things I can do to shore up this PR. I appreciate your consideration!
I closing this PR for now. Please reopen once the review comments are addressed.