-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
drag_to
clicks links
#2580
Comments
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 |
Guys, any update on this one? We're a bit stuck with this on not being able to update to 3.40 (which fixes empty attachments thing). |
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: