I need to scroll the page on AngularJS application using protractor
browser.executeScript('window.scrollTo(0,200);').then(function () {
The above code is not getting executed.
I need to scroll the page on AngularJS application using protractor
browser.executeScript('window.scrollTo(0,200);').then(function () {
The above code is not getting executed.
You can use this library: https://www.npmjs.com/package/sg-protractor-tools
You can use the library's functions by referencing the sgpt object, e.g. for scrolling:
sgpt.scroll.scrollTo(...);
Try this one
var scrolldown = by.css(' keep your class here');
browser.controlFlow().execute(function() {
browser.executeScript('arguments[0].scrollIntoView(true)', scrolldown.getWebElement());
});