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>
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With