18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

DragDrop on Jquery Draggable using Sahi not working

VijuViju Members
edited November -1 in Sahi - Open Source
We implemented a drag and drop using Jquery UI component. I tried automating the drag and drop using the following code but it is not working

var $dragpos = _position($draggable);
var $dragposx = $dragpos[0];
var $dragposy = $dragpos[1];
var $pos = _position(_span("span_12"));
var $y = $pos[1];
var $postimespan = _position(_span("0925"));
var $x = $postimespan[0];
_call(_sahi.simulateMouseEventXY($draggable, "mousedown", $dragposx, $dragposy));
_dragDropXY($draggable,$x,$y);

Sahi says success but it doesnt do drag and drop.

A sample is present in this location.

jqueryui.com/demos/draggable/#snap-to

The reason that I think is wrong in the above code is mousedown. When I manually move the item , I have to hold the object with the left mouse button pressed while dragging which I believe the above code is not able to do. Any solution on this?

Comments

  • Has anyone faced this issue or was it done before. If yes, help appreciated.
  • narayannarayan Administrators
    Hi Viju,

    This issue has been fixed. (There was a bug in Sahi). The fix will be available in the next build (should be released in a day or two). We are emailing you a link to an intermediate build, so that you can verify.

    Regards,
    Narayan
  • Hi Narayan,

    Thanks for responding to this thread. Can you please send me the link for the build?

    Thanks
    Viju
  • any update for the next build for this drag and drop issue?
    Where is it? Can you also send me the link please? Thanks
  • narayannarayan Administrators
    The latest build is now available for download on SourceForge. http://sourceforge.net/projects/sahi/files/sahi-v3/2010-11-03/sahi_20101103.zip/download
  • Downloaded the build and the issue is resolved. Thanks Sahi team for the quick response.

    For the record, the above mentioned code can be used for the JQuery UI components , drag and drop.
This discussion has been closed.