drag_to with jquery sortable list

845 views
Skip to first unread message

Karl

unread,
Sep 15, 2011, 12:27:41 PM9/15/11
to Capybara
I have been struggling to test sorting of a jquery sortable with both
the capybara-webkit and selenium driver. I have reproduced the issue
with a small project on github:

https://github.com/kbaum/dragdrop

To see my test code, take a look at the feature file and step def.

Not sure what I am doing wrong. When I run with selenium it looks
like the item is not getting dragged to the correct location.

https://github.com/kbaum/dragdrop/blob/master/features/drag_drop_list_items.feature
https://github.com/kbaum/dragdrop/blob/master/features/step_definitions/drag_drop_list_items_steps.rb

Does anyone use capybara drag_to to test sorting within jquery?

thx!

-karl

DI deedee

unread,
Sep 15, 2011, 12:34:17 PM9/15/11
to ruby-c...@googlegroups.com
+1, have the same issue

Jonas Nicklas

unread,
Sep 15, 2011, 1:19:14 PM9/15/11
to ruby-c...@googlegroups.com
Afaik, sortable doesn't work with drag_to. Testing sortable lists is
pretty painful tbh, haven't found a good solution. Use the search,
there's been at least one discussion about this before, iirc.

/Jonas

Karl Baum

unread,
Sep 15, 2011, 2:07:53 PM9/15/11
to ruby-c...@googlegroups.com
Any ideas on what the problem is? It looked to me like drag_to was just not dragging to the correct location within the page.

I found a few old discussions on this subject. This one is the most useful:

http://groups.google.com/group/ruby-capybara/browse_thread/thread/9b0ec0511836dfff/9450c2a42823d646?lnk=gst&q=drag_to#9450c2a42823d646

In that post they mention that this is a problem with the selenium-webdriver ruby client. Should we bring this up with them? Are there any other options?

thx!

-karl

Reply all
Reply to author
Forward
0 new messages