javascript - Move Google maps map to right through protractor js -


i using protractor test angularjs application built ng-map google maps directive.

in test, zoom in/out clicking on +/- visible in maps. however, pan map, there no controls in google maps javascript api v3.

so thought of sending right arrow key event browser simulate panning towards east direction.

browser.actions().sendkeys(protractor.key.arrow_right).perform(); browser.sleep(5000); // hold browser notice change. 

however, when run it, not see change in view of map.

solved in comments above -- tried manually on our app uses google maps, sending right arrow should work after giving map focus. suggestion try clicking on map first before performing right arrow.

var map = element(by.css('div.google-map')); map.click(); // give map focus browser.actions().sendkeys(protractor.key.arrow_right).perform(); // move map browser.sleep(5000); // hold browser notice change. 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -