Drag and drop fails on JQuery draggable and droppable

I spent a lot of hours on fixing an annoying failure on cucumber scenario’s containing drag and drop. In migrating these scenario’s to capybara I’m using the drag_to command. This works fine on the webkit driver, but not on the default selenium on firefox driver. I looked at bot h implementations to see the differences in drag_to for webkit and selenium-webdriver, but no clues.

In the end I reverted to checking my drag and drop code. I found that I was using tolerance: ‘pointer’ on the JQuery droppable. This will cause JQuery to check for the location of the mouse pointer in determining if the draggable is on the droppable. Aparently this is not the case using webdriver for firefox. Changing the tolerance to the default ‘intersect’, it works. I guess the firefox-webdriver does not update the mouse-pointer with move_to or something. I filled a report here.

Now to figure out why we used ‘pointer’ in the first place 🙂

Explore posts in the same categories: Profession