Just starting out with protractor and jasmine, I find myself relying heavily on browser.sleep to ensure my test cases run smoothly.
it('Procedure tab-', function() {
element(by.linkText('Medical History')).click();
browser.sleep(500)
element(by.linkText('Personal History')).click();
browser.sleep(200)
element(by.linkText('Procedure')).click();
browser.sleep(500)
element(by.css('[data-ng-show="ptab.index === 1"] > [profile="profile"] > #medicalhistory > .card > [header="header"] > .card-header-bg > .title-header > .row > [ui-sref=".procedure.new"] > [data-ng-hide="important"]')).click();
browser.sleep(500)
$('label[for="dis4Appendicitis"]').click();
browser.sleep(2000)
})
I'm looking for a more efficient way to write my test cases without relying on browser.sleep. Slow internet speeds have been a factor in why I've used it so much.
Any suggestions or guidance would be greatly appreciated.