angularjs - how to wait for drop down population before executing protractor e2e tests? -


i testing scenario there 3 checkboxes populated based on service call , response of http get.

the having when run tests protractor conf.js drop downs have not yet been populated response http response, , when try testing browser stops , tests fails.

is there way protractor can wait before running tests on drop downs filled?

conf.js: // example configuration file. exports.config = {   //directconnect: true,    // capabilities passed webdriver instance.   capabilities: {     'browsername': 'chrome'   },    // framework use. jasmine 2 recommended.   framework: 'jasmine2',    // spec patterns relative current working directly when   // protractor called.   specs: ['e2e/*.js'],    baseurl: 'http://localhost:4000/',     // options passed jasmine.   jasminenodeopts: {     defaulttimeoutinterval: 30000   } };  test file:  var select = element(by.model('make')); console.log(select); select.$('[value="acura"]').click(); 

this fails on click event because when test runs select has no option elements select gets populated json http response.

thanks in advance!!

you can try using method below; before calling click.

browser.waitforangular(); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -