-
Notifications
You must be signed in to change notification settings - Fork 163
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
No WebDriver\Session::moveto() call when dragging onto itself #359
No WebDriver\Session::moveto() call when dragging onto itself #359
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #359 +/- ##
============================================
+ Coverage 90.19% 90.64% +0.45%
+ Complexity 168 151 -17
============================================
Files 1 1
Lines 469 449 -20
============================================
- Hits 423 407 -16
+ Misses 46 42 -4 ☔ View full report in Codecov by Sentry. |
is this something that could be covered by a test in the mink driver testsuite ? |
probably by hiding the dragged element on |
Well, if we don't have a test covering it, we risk regressing on that case. |
if this will imply the fix will be merged then, I can code the test
simply like this or use native https://github.com/Shopify/draggable lib? (about 100KB) |
if we can do it with a simple implementation, it will be better for the driver testsuite IMO. and yes, once we have tests for it, I would happily accept that patch. |
@stof please merge, tested in minkphp/driver-testsuite#59 I will then address minkphp/driver-testsuite#59 (comment) and #354 |
afbf746
to
afa138b
Compare
afa138b
to
663bfb2
Compare
How to skip the |
@mvorisek , Test skipping can be done in the The only purpose of the test you've mentioned (added by you) was to confirm, that code changes from this PR (added by you) will continue to work as expected. Then, why do you need that test to be skipped? |
In Selenium 3 (and with regular mouser/keyboard) the dragging works. In Selenium 2, it seems it does not, IDK why. Help welcomed. I did some experiments with Selenium 2 and it seems the dragging is not emulated well enough. Please advise what to do and how to detect Selenium 2. Or how to fix Selenium 2 of course if you have an idea. |
I've checked on Selenium 2 + Chrome and it works, but Selenium 2 + Firefox doesn't. Visually it looks like once the element is clicked without releasing a mouse button (to perform drag) it disappears somewhere and never drops back. Maybe it is a bug in Selenium or geckodriver itself. |
I've checked with different Firefox versions on Selenium 2 and :
I wish we could use the more recent browser versions on GitHub Actions. Maybe used docker image page can help in detecting what docker image version should get us desired Selenium Server + Firefox version: https://hub.docker.com/r/selenium/standalone-firefox . |
@uuf6429 , do you know what tag of the Tests for this PR are failing only because of outdated Firefox version usage in the Selenium Dockerimage. The same test failure also occurs on the minkphp/webdriver-classic-driver#27 . |
@aik099 That being said, we could probably reverse engineer it (the docker layers are publicly readable) to have an up-to-date firefox. |
If that can be done, then both Selenium-based drivers would benefit from this. I've created a #391 about this. |
663bfb2
to
696ed94
Compare
Merging, because test from the minkphp/driver-testsuite#59 is already merged. Thanks @mvorisek . |
This fixes dragging over itself, ie. source element = destination element, in such usecase, extra
WebDriver\Session::moveto()
call is redundant.Drag library like https://github.com/Shopify/draggable needs this fix as the source element is very often transformed when dragging and
WebDriver\Session::moveto()
is failing otherwise.also remove
Selenium2Driver::withSyn()
call as completely useless for dragging, the current impl. ofSelenium2Driver::dragTo()
does not use it