protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Drag and Drop testing for slider , with margin defined in percent

Open snehacharkha opened this issue 11 years ago • 2 comments

Hi ,

Very new to protractor , and i need to do drag and drop testing for a slider bar.

i believe, ptor.actions().dragAndDrop(slider.find(), {x:100, y:0}).perform() should do the work .

But can some one please tell me where to look for value of x and y ;

Here's the code snippet screen shot 2015-02-09 at 5 41 34 pm

snehacharkha avatar Feb 10 '15 20:02 snehacharkha

@juliemr DO u have a suggestion to this

snehacharkha avatar Feb 10 '15 21:02 snehacharkha

x and y are coordinates on the screen. I cannot possibly tell the values without actually looking at the page. You can, instead of specifying a location, specify a target element though if you're trying to drag one thing to something else. However, please note that the drag and drop API is buggy, and the bug is out of our control (see https://github.com/angular/protractor/issues/1525)

sjelin avatar Feb 10 '15 22:02 sjelin