In Following Protractor Code
const tabs = await element.all(by.id('tab'));
tabs.forEach(async tab => {
tab.click().then(function() {
element.all(by.id('radio1')).click();
});
});
await element(by.id('saveAndContinue')).click();
radio1 is only clicked in last tab because of which last line of saveAndContinue is hidden and thus click() of it fails
While Sleep does work outside of FOR loop it doesn't when i want to allow time before radio1 click
EDIT 1: Problem is every line is executing BUT radio1 clicks for last Tab not previously clicked tab. Tab click is fast for radio1 to be clikced.