tranquire
tranquire copied to clipboard
Drag and drop actions
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)