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
[py]: remove deprecated find_element_by_
methods
#10712
[py]: remove deprecated find_element_by_
methods
#10712
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #10712 +/- ##
==========================================
+ Coverage 46.64% 47.36% +0.71%
==========================================
Files 86 86
Lines 5855 5572 -283
Branches 278 278
==========================================
- Hits 2731 2639 -92
+ Misses 2846 2655 -191
Partials 278 278
Continue to review full report at Codecov.
|
Hello, |
For anyone who's in the process of updating their code, here are 16 find-and-replace strings that you can use:
You'll also need to import
|
These are supported in Selenium 3 but become mandatory in Selenium 4. Helpful translation table: SeleniumHQ/selenium#10712 (comment)
It's a more maintainable API and more consistent with what the other implementations are doing. There's a lot of code in this repo to keep on top of, and we also like to have time to drink beer and eat curry. |
@titusfortner that's a perfectly understandable explanation. Thank you! Enjoy your beer and curry :) |
Remove deprecated find_element_by_* and find_elements_by_* (SeleniumHQ/selenium#10712) Save images using original filename
- Deprecated find_element_by_ methods in SeleniumHQ/selenium#10712 - DeprecationWarning: executable_path has been deprecated, please pass in a Service object in SeleniumHQ/selenium#9995 - Instead default chromedriver by [undetected-chromedriver](https://pypi.org/project/undetected-chromedriver, to fix https://stackoverflow.com/questions/59515561/this-browser-or-app-may-not-be-secure-error-while-attempting-to-login-in-to-gm
- Upgrade Python to 3.9 now that cffi provides musllinux packages - Upgrade Selenium standalone Chrome to 4.8.1 for newer ESM support - Run tests in verbose mode and update one Selenium import - Update find_elements?_by_.*(...) calls to find_elements?(By..., ...) since SeleniumHQ/selenium#10712 - Close driver during teardown even when there is no result outcome, to avoid keeping connections open for too long - Add remote connection timeout to detect connection issues earlier per SeleniumHQ/selenium#11596 - Remove some Python 2 import attempt - Axe report: Do not exit out if file does not exist - Adjust move_to_element_with_offset calls to work in center element, based on SeleniumHQ/selenium#11402 - Quit driver and set to None at teardown. This should properly close the session, allowing the connection to be reused for another test. - Update browser-sync
I think this is alright for
4.3
now. Removal offind_element_by_
methods throughout the python bindings. I don't think any tests where running through those but instead the correctfind_element|find_elements
. Will grab fallout from CI if any occurs.Likely some
docs
related fallout here, will address as I find it.