protractor - Are elementfinder promises resolved on declaration? -


i know elementfinders promises i'm not sure how promise behaves if define elementfinders in beginning of page object. looking @ example:

var eventheader = function (context) {     this.eventname = this.moduleroot.element(by.css('.event-name'));     this.venuename = this.moduleroot.element(by.css('.venue-name'));     this.eventtime = this.moduleroot.element(by.css('.event-time'));     this.eventdate = this.moduleroot.element(by.css('.event-date'));     this.marketname = this.moduleroot.element(by.css('.market-name')); }; 

will protractor try resolve promises when page objects initialised?

i guess other option define locators in beginning , create methods return elementfinder itself.

the element finders not execute until call function on them. have make sure elements on page when call click(), sendkyes(), etc.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -