In my Protractor Test suite I have some problem with parametrizing number of tests .
it('Login and Count', function () {
PageObject.login();
var number = element.all(by.something()).count().then(function(n){
//here i have my number which i want to use to run next 'it' n times
});
});
it('Run number '+ m,function () {
PageObject.Run(m);
})
My problem is that I am able to reach my count result only inside then block when promise is resolved. How to use that to execute second it as many times as i want ? I am not able to write this result to global variable.
Sorry I am JS newbie and async promises are still a hell for me