Reputation: 77
I have to create automated tests for automating click and drag and drop in Html canvas.
Upvotes: 0
Views: 2403
Reputation: 41
Actions act=new Actions(driver);
act.DragAndDrop(webElement_Source, webElement_Target)).Build().Perform();
Upvotes: 0
Reputation: 754
Well long story short we can do this using Actions class. Below code should get you started.
Actions act = new Actions(driver);
act.dragAndDrop(fromLocation, toLocation).perform();
Just ensure both fromLocation and toLocation are webelements. Cheers
Upvotes: 1