Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and drop actions #71

Open
3 tasks
Galad opened this issue Jun 4, 2018 · 0 comments
Open
3 tasks

Drag and drop actions #71

Galad opened this issue Jun 4, 2018 · 0 comments

Comments

@Galad
Copy link
Owner

Galad commented Jun 4, 2018

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant