angularjs e2e - Protractor ignoreSynchronization issue -
i developing e2e test suite 1 of applications. have sso non angular site, our site angular site. in start of test make call sso settings:
browser.ignoresynchronization = true; browser.get(browser.baseurl + '/agoda/home?mock=mock-jax);
i able log on sucessfully , redirects application angular site. set browser.ignoresynchronization = false; redirect application , loaded. after nothing works.
i try read following:
var books= element.all(by.repeater('book in books')); console.log(licenses.count());
results
{ ptor_: { controlflow: [function], schedule: [function], setfiledetector: [function], getsession: [function], getcapabilities: [function], quit: [function], actions: [function], touchactions: [function], executescript: [function], executeasyncscript: [function], call: [function], wait: [function], sleep: [function], getwindowhandle: [function], getallwindowhandles: [function], getpagesource: [function], close: [function], getcurrenturl: [function], gettitle: [function], findelementinternal_: [function], finddomelement_: [function], findelementsinternal_: [function], takescreenshot: [function], .. }
i believe has ignoresynchronization not sure doing wrong?
you not catching promise count()
function returns callback after execution. protractor built on webdriverjs model of async promises. has nothing ignoresynchronization
, console logging protractor instance object instead of value. need console log value returned through promise. here's how -
var books= element.all(by.repeater('book in books')); books.count().then(function(bookscount){ console.log(bookscount); });
the above way of using .then()
in above code should solve problem. more promises. hope helps.
Comments
Post a Comment