I am using puppeteer to automate form filling process.I have written a code in which i have used page.waitFor function each time when it needs time to load whether it's page or form element.
Suppose i put a wait like waitFor(10000) to load that element.Usually it takes less than that but if internet is slow then it might take more than that. So in this case it fails.
Just like this i put lots of waitFor() in my code at each step and anyone of them can fails at any point.
I want something like which waits until the page and that specific element loads completely and i don't need to use and be worried for any of that wait method.
I am a new to this , so help is much appreciated.Thanks.