You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capybara Version:
3.37.1
Driver Information (and browser if relevant):
Selenium 4.2.1 on Chrome 105
Expected Behavior
Calling drag_to on a link causes Capybara to first drag/drop it and then click it. I don't understand why it would click it but that's what happens. It shouldn't.
Not much that can be done about this. Capybara doesn't send a click event, it sends the HTML5 drag events (since an A element is by default draggable) -- then either the driver or the browser is interpreting the release of the mouse after dragging as a click
I don't think it's the browser because 1) doing such a drag and drop manually doesn't cause a transition and 2) I used to use my own implementation of such a functionality which works fine. Perhaps the problem is in click_and_hold and then release? I would be surprised for that to be a bug in Selenium though - no one to have hit such a problem.
I've seen this in the past specifically on CI. The issue seems to be that if the drag_to element is not an actual drop handler, the browser ends up sending a click instead of a drag. It seems to be that the mouse doesn't actually move/drag to that point.
Meta
Capybara Version:
3.37.1
Driver Information (and browser if relevant):
Selenium 4.2.1 on Chrome 105
Expected Behavior
Calling
drag_to
on a link causes Capybara to first drag/drop it and then click it. I don't understand why it would click it but that's what happens. It shouldn't.Actual Behavior
The link is clicked.
Steps to reproduce
Run this. The
drag_to
line causes a transition togoogle.com
. Thenhas_css?
fails (as it's on a different page).The text was updated successfully, but these errors were encountered: