-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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: 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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
* 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 <[email protected]>
Description
RelativeBy#near
should 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