angularjs - Using browser.get causes asynchronous script timeout -


i'm using protractor automation testing , encountered following behavior:

when try use browser.get load certin page page loaded following error:

error while running testforangular: asynchronous script timeout: result not received in 11 seconds. 

i use browser.get in following way:

beforeeach(function() {      browser.ignoresynchronization = false;      browser.get('https://.../automation_vf');      browser.ignoresynchronization = true; },60000);  it(data.testproperties.description, function () {         browser.executescript('return remoteactions;')        .then(function(remoteaction) {                 browser.executeasyncscript(function(remoteaction) {                 var callback = arguments[arguments.length - 1];                     visualforce.remoting.manager.invokeaction(remoteaction.clearalldata, function (res, ev) {                         callback(res);                     }, { buffer: false, escape: false, timeout: 15000 });                 },remoteaction).then(function(res) {                     console.log("executing async script");                     console.log(res);                 });         }); }); 

my conf file is:

exports.config = {   framework: 'jasmine2',   seleniumaddress: 'http://localhost:4444/wd/hub',   specs: ['multitestrun.js'],   getpagetimeout: 60000,   rootelement: '[ng-app]',   jasminenodeopts: {       showcolors: true,       defaulttimeoutinterval: 10000000,       isverbose: true,       includestacktrace: true   },   ... }; 

the page automation_vf non angular page. if try use browser.get command after browser.ignoresynchronization set true page not lodaed.

my question why error mentioned above (the error happens when of code inside block commented out) , how can make browser.get command work execute script commands inside block ?

my first suggestion use page objects , extract automation_vf page handle retrieval of page itself. way objects know how , specs know how disable/enable synchronization. this may moving.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -