I am using browser.sleep(10000);
in my JavaScript code using Protractor frame work.However,when i execute my script multiple time some times it gets passed or failed for not identifying the object.
Is there an alternative method to check whether the page is loaded and element is visible and enabled so that script does not fail during execution.