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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Inconsistent find_element(s)_by_* deprecation warning and command documentation #8806

Closed
bonafideduck opened this issue Oct 18, 2020 · 2 comments

Comments

@bonafideduck
Copy link

🐛 Bug Report

In the python remote/webdriver.py code, find_element_by_id() and many similar commands have this warning:

warnings.warn("find_element_by_* commands are deprecated. Please use find_element() instead")

find_element() and find_elements() have this contradicting documentation comment:

    """
    Find an element given a By strategy and locator. Prefer the find_element_by_* methods when
    possible.
    """

To Reproduce

Look at the code links above.

Expected behavior

Personally, I don't see why the find_element(s)_by_* commands have been deprecated. So I didn't expect to see that warning. If someone has a pointer to a conversation that lead to this decision, I'd like to see it.

At a minimum, I'd like the documentation and code be consistent.

Test script or set of commands reproducing this issue

NA

Environment

github source

@AutomatedTester
Copy link
Member

The decision was to simplify the APIs across the languages and this does that. The docstring was missed and now been corrected.

@bonafideduck
Copy link
Author

Well if simplifying the APIs allows this quick of a fix time, I can live with the change 🎃

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants