selenium
selenium copied to clipboard
[py]: Align error handling to `W3C`
Converts the error codes into a Tuple as they are immutable and adds appropriate type hints for them.
Removes unused vars screen & stacktrace as they are redefined later when used.
Looking at this again we can remove the numbers, that's a hangover from JWP that we are trying to remove anyway
Codecov Report
Merging #10657 (da85cde) into trunk (744b4bd) will decrease coverage by
0.03%. The diff coverage is50.64%.
@@ Coverage Diff @@
## trunk #10657 +/- ##
==========================================
- Coverage 48.42% 48.38% -0.04%
==========================================
Files 84 84
Lines 5485 5481 -4
Branches 279 279
==========================================
- Hits 2656 2652 -4
Misses 2550 2550
Partials 279 279
| Impacted Files | Coverage Δ | |
|---|---|---|
| py/selenium/webdriver/remote/errorhandler.py | 54.60% <50.64%> (+0.11%) |
:arrow_up: |
| py/selenium/webdriver/remote/remote_connection.py | 29.78% <0.00%> (-0.71%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 744b4bd...da85cde. Read the comment docs.
Refactoring the error handling is a bigger task than initially thought; all the tests are parameterised for the (int, str) so the new str only is iterable and unpacking itself into hundreds of parameterised tests :smile: need to keep grinding on this one gradually!
I think the error handling code could use a rewrite to scrub some JWP code, I will do it as a follow up ticket.