angularjs - How to perform scroll down/up using protractor E2E testing -


i new protractor e2e test. need scroll on map using protractor , select location on it. didnt find way of automatically performing scroll on map section on internet asking on forum.

<map-edit-panel poi-icons="inactive" zoombarrier="16.5" class="full-map-image" mode="location" show-editor="true" filter="nvt_link" show-zoom="true" id="mapcontainer"><!-- ngif: showzoom --><div ng-if="showzoom" class="map-ui-right-center ng-scope"> <div ng-click="geolocate()" class="map-ui-zoom-control map-ui-geolocate"></div> <div ng-click="zoomin()" class="map-ui-zoom-control map-ui-zoom-control-up"></div> <div ng-click="zoomout()" class="map-ui-zoom-control map-ui-zoom-control-down"></div> 

this code map section , need perform automated scroll up/down it. please share valuable ideas.

1)scroll up

browser.executescript('window.scrollto(0,0);').then(function(){                 console.log('++++++scrolled up+++++');             }); 

2)scroll down

 browser.executescript('window.scrollto(0,10000);').then(function () {                 console.log('++++++scrolled down+++++');             }); 

3) scroll particular webelement

var =gutils.$element(gutils.$locatorxpath('xpath'));             browser.executescript("arguments[0].scrollintoview();", we.getwebelement()).then(function(){                we.click();             }); 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -