Let's say i use the page.click() function, to simulate a click on a link:
await page.click('.some_link')
In the new page rendered by the browser(full page load, not SPA), i want to use page.click() again, on some element. Problem is, that even though the button is being "clicked"(i see the element focused), the attached JS listener doesn't fire, which make me suspect that the click() function fires before the new page was completely loaded.
If i create a delay with setTimeOut, everything works.
To make things short: how do i make sure that a new page was fully loaded, after a navigation was triggered? I tried playing around with page.waitForNavigation(), always getting a timeout error(from the docs, it's not even clear to me, when this function needs to be used).