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.

Sahi Ruby Tests failing with error for DragAndDrop

Hello,
I am getting below error while running Sahi Ruby Test, all tests pass except one which gives error for the Drag and Drop.
lized%3FstartUrl%3Dhttp%253A%252F%252Fsahi.example.com%252F_s_%252Fdyn%252FDriver_initialized"
[java] Apr 20, 2015 1:57:27 PM net.sf.sahi.test.ProcessHelper$PIDGatherer run
[java] INFO: PIDs: [22696]; 2404 ms
[exec] ............E
[exec] ===============================================================================
[exec] Error: test_dragdrop(SahiDriverTest)
[exec] :
[exec] RuntimeError: error:_dragDrop(_div("Drag me"), _xy(_div("Item 2"), 5, 5))
[exec] TypeError: Argument 16 of DragEvent.initDragEvent does not implement interface DataTransfer.
[exec] Sahi.prototype.simulateDragEventXY@http://www.snook.ca/_s_/spr/concat.js:1046:1
[exec] Sahi.prototype.simulateDragEvent@http://www.snook.ca/_s_/spr/concat.js:1003:5
[exec] Sahi.DragDropper/this.start@http://www.snook.ca/_s_/spr/concat.js:434:6
[exec] Sahi.DragDropper/this.execute@http://www.snook.ca/_s_/spr/concat.js:448:3
[exec] Sahi.prototype.dragDropXYCommon@http://www.snook.ca/_s_/spr/concat.js:552:2
[exec] Sahi.prototype._dragDrop@http://www.snook.ca/_s_/spr/concat.js:376:5
http://www.snook.ca/_s_/spr/concat.js line 3607 > eval:1:1
[exec] Sahi.prototype.ex@http://www.snook.ca/_s_/spr/concat.js:3607:9
http://www.snook.ca/_s_/spr/concat.js:3373:5
[exec]
[java] Apr 20, 2015 1:57:39 PM net.sf.sahi.command.RhinoRuntime eval
[exec] <a href='/_s_/dyn/Log_getBrowserScript?href=null&n=1046'><b>Click for browser script</b></a>
[java] WARNING: Should not have come here: RhinoRuntime.eval: _scriptPath()
[java] Apr 20, 2015 1:57:39 PM net.sf.sahi.test.ProcessHelper kill
[java] INFO: Kill: [22696]
[exec] C:/Users/iwx/sahiv5/ruby/lib/sahi.rb:150:in `execute_step'
[exec] C:/Users/iwx/sahiv5/ruby/lib/sahi.rb:458:in `drag_and_drop_on'
[exec] ./sahi_test.rb:398:in `test_dragdrop'
[exec] 395:
[exec] 396: def test_dragdrop()
[exec] 397: @browser.navigate_to("http://www.snook.ca/technical/mootoolsdragdrop/";)
[exec] => 398: @browser.div("Drag me").drag_and_drop_on(@browser.xy(@browser.div("Item 2"), 5, 5))
[exec] 399: assert @browser.div("dropped").exists?
[exec] 400: assert @browser.div("Item 1").exists?
[exec] 401: assert @browser.div("Item 3").exists?
[java] Apr 20, 2015 1:57:40 PM net.sf.sahi.test.ProcessHelper execute

Please let me know if anyone has the fix

Answers

Sign In or Register to comment.