javascript - WebDriverJS control flow -


protractor uses webdriverjs under hood.

webdriverjs uses concept of "control flow" ensure async tasks executed in expected deterministic order.

so following work expected:

myelement.click(); browser.executescript(...); 

but, if add function of promise returned 1 of these functions on browser, continue work in expected way?

for example:

browser.executescript(...).then(function() {   browser.navigate(...); }); 

will control flow maintained above code?

should be. it's called framing in webdriverjs' documentation:

flow.execute(function() {   console.log('a'); }).then(function() {   flow.execute(function() {     console.log('c');   }); });  flow.execute(function() {   console.log('b'); });  // // c // b 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -