mardi 20 mars 2018

I am new to protractor, I want to my promise to be resolve then the rest of the execution should take place.

this.BrandSetup = function (BrandName, URL, BrandDescription) {

    browser.isElementPresent(brandListingPagePo.box_AddNewBarnd).then(function (result) {
        if (result) {
            brandListingPagePo.box_AddNewBarnd.click();
        }

I am calling this function three times for the first time it does not work maybe because of the (.then) promise is not resolved for the second and the third time it works fine.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire