I am working on a task that writing UI testcase(Automation) by selenium in Java. I have a html page that It contains the element I need to drag to a target. I have tried with the Action come-up with selenium, It's not working for me. So I have searched for a alternative way That I would like to write a script for drag and drop Action on a UI and execute this script with selenium executeScript() method. AFAIU this element drags as a copy of it's element (Cloning) and drop it where we need to. So Can anyone help me through this to write a script for drag and drop Action
As I observed the level of action for drag and drop
- Click & hold on the element
- Get a copy of the element (cloning) and move to desire place that we want
- Release it to a target.
P.S I have am unique id for both element(#g1) I need to drag and the place(#a) I need to drop it.