I am new in Protractor and having issues in putting wait statement My code is below:
element(by.xpath('html/body/app-root/div/app-dashboard/div/div/div[2]/div[1]/div/app-dashboard-filter/span/span/img')).click();
Before performing the click() operation I want protractor to wait for '/html/body/app-root/div/app-dashboard/div/div/div[1]/div[3]/div/div[1]/h5' element. This element comes in 4 seconds
After searching the INTERNET, I have tried below things:
1. browser.driver.sleep(5000);
2. browser.driver.manage().timeouts().setScriptTimeout(55000);
3. expect(element(by.xpath(/html/body/app-root/div/app-dashboard/div/div/div[1]/div[3]/div/div[1]/h5')).isPresent()).toBe(true);
4. browser.manage().timeouts().implicitlyWait(5000);
But due to one or the other error nothing worked for me. Please help!