mardi 26 janvier 2016

Protractor writing a cleaner test cases without using browser.sleep

Im new to protractor and jasmine and I use lot of browser.sleep to make my test cases work

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)
    })

What could be more efficient way to write a test case without using browser.sleep........I have been using sleeps because of slower internet connectivity etc....

Any help is appreciated

Aucun commentaire:

Enregistrer un commentaire