drag_to don't work on sortabble elements

702 views
Skip to first unread message

Cristian

unread,
Nov 22, 2010, 12:31:22 PM11/22/10
to Capybara
Hi,

I'm testing some Sintra app using Cucumber and Capybara with Selenium
driver, but I'm stuck in some drag and drop functionality, the app is
using Jquery sortable method to do the job; seem's that is not the
same drag an element with draggable - droppable functionality that
drag one with sortable functionality, the last one just don't work.

am I right ?, there is a solution ?

thanls,

Cristian

unread,
Dec 3, 2010, 7:10:59 PM12/3/10
to Capybara
Any one ?

Jonas Nicklas

unread,
Dec 4, 2010, 5:32:22 AM12/4/10
to ruby-c...@googlegroups.com
Afaik the drag drop in sortable list relies on distance, rather than
which element you are dragging over. drag_to might not work in that
case. A colleague of mine did something with drag_by, which is an
internal Selenium method that Capybara does not diectly expose (call
fint('foo').native.drag_by). It's all a bit tricky, I don't think he
got it working very well.

/Jonas

Jari Bakken

unread,
Dec 4, 2010, 7:26:30 AM12/4/10
to ruby-c...@googlegroups.com
On Mon, Nov 22, 2010 at 6:31 PM, Cristian <cristia...@gmail.com> wrote:
> Hi,
>
> I'm testing some Sintra app using Cucumber and Capybara with Selenium
> driver, but I'm stuck in some drag and drop functionality, the app is
> using Jquery sortable method to do the job; seem's that is not the
> same drag an element with draggable - droppable functionality that
> drag one with sortable functionality, the last one just don't work.
>

Proper drag and drop support is being worked on:

http://code.google.com/p/selenium/issues/detail?id=842
http://code.google.com/p/selenium/issues/detail?id=244

Still hasn't landed for the Firefox driver though.

Reply all
Reply to author
Forward
0 new messages