user3482804
user3482804

Reputation: 221

Slider testing using protractor

Very new to protractor, and trying to test a slider using protractor. I found:

ptor.actions().dragAndDrop(slider.find(), {x:100, y:0}).perform()

should do the work. But its not helping in my code, can some one suggest something here?

The HTML code snippet:

<input ng-model="sliderValue" type="text" id="slider" slider="" options="sliderOptions" class="ng-pristine ng-untouched ng-valid ng-isolate-scope ng-hide" value="60">

<div class="jslider-pointer" style="left: 100%; background-color: rgb(3, 155, 229);"></div>

Upvotes: 4

Views: 5870

Answers (1)

alecxe
alecxe

Reputation: 473833

You should pass an element you found to dragAndDrop():

var slider = element(by.id('slider'));

browser.actions().dragAndDrop(
    slider,
    {x:100, y:0}
).perform();

See other examples here:

Upvotes: 7

Related Questions