py: fix RelativeBy#near to take 2 parameters#13082
Conversation
|
19faad6 to
0e958aa
Compare
resurrected default
sure. |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #13082 +/- ##
==========================================
+ Coverage 57.65% 58.03% +0.37%
==========================================
Files 86 86
Lines 5281 5319 +38
Branches 208 204 -4
==========================================
+ Hits 3045 3087 +42
Misses 2028 2028
+ Partials 208 204 -4 ☔ View full report in Codecov by Sentry. |
|
The "issue" is that Java and C# already accept distance as a parameter. JavaScript and Python don't, and I did not understand the Ruby code to know whether it accepts it. |
|
the main issue is following def near(self, element_or_locator_distance: Union[WebElement, Dict, int] = None) -> "RelativeBy": |
Good point. Where can I see the failed test that shows the bug on the current implementation? |
0e958aa to
7f9cf88
Compare
|
running test on faddc1b clearly shows |
|
@pinterior can you please fix the linting so I can merge this? |
* add failing test to check RelativeLocator#near accept single int * fix s.w.support.RelativeBy#near to take 2 parameters * more strict typing on s.w.support.relative_locator * add some tests for s.w.support.relative_locator * remove test case calling RelativeLocator#near wrong way * fix linting issues --------- Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
* add failing test to check RelativeLocator#near accept single int * fix s.w.support.RelativeBy#near to take 2 parameters * more strict typing on s.w.support.relative_locator * add some tests for s.w.support.relative_locator * remove test case calling RelativeLocator#near wrong way * fix linting issues --------- Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
Description
RelativeBy#nearshould take 2 parameters to specify target element (or locator) and distance.also:
remove default arguments raises ExceptionMotivation and Context
want to find far element
Types of changes
Checklist