'Drag and drop an image/attachment in selenium using ruby

I am looking for the functionality to drag an attachment from one place and drag to text box

I am using

browser.action.drag_and_drop(src, tar).perform 

to do the job but this method is just doing dragging the src element but not dropping to target instead the image is hanging around



Solution 1:[1]

Native drag and drop of html5 elements is broken in all of the major bowsers still. https://wpt.fyi/results/webdriver/tests/perform_actions/pointer.py

There are issues reported in chromedriver and geckodriver projects, but no progress for quite a while.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 titusfortner