tranquire icon indicating copy to clipboard operation
tranquire copied to clipboard

Drag and drop actions

Open Galad opened this issue 7 years ago • 0 comments

Add actions that allows to drag elements on a page:

var itemToDrag = Target.The("item to drag").LocatedBy(By.Id("item"));
var drop = Target.The("Drop target").LocatedBy(By.Id("drop"));
var action = Drag.Target(itemToDrag).AndDropTo(drop);
Actor.Given(action);
  • [ ] Drag target and drop to other target: Drag.Target(itemToDrag).To(drop)
  • [ ] Drag target and drop to other target by moving the cursor by steps: Drag.Target(itemToDrag).ToByMovingCursor(target)
  • [ ] Drag target, move x pixels and drop: Drag.Target(itemToDrag).ToByOffset(100, 50)

Galad avatar Jun 04 '18 19:06 Galad