protractor - Are elementfinder promises resolved on declaration? -
i know elementfinder
s promises i'm not sure how promise behaves if define elementfinder
s 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
Post a Comment