I click on button that trigger http request And I want to be able to close the page after the request done.
Example: Await page.click(some button that trigger http request)
I have tried :Await page.waitForLoadState() With “load” and “networkidle” and its didnt work. For load the page closed without the request finish and for networkidle waiting until timeout.
I want to be able to wait for all the xhr request in the background to be finished