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