Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wait for network idle after click

I'm looking for a method that would allow me to wait for the network idle after clicking a button or some action. there is a way to wait for the network idle after clicking?

page.locator("text=Click").click()
//some method that wait network is idle after clicking the button`

I tried waitForLoadState works only if there is navigation. waitForResponse works on specific requests but it's not good for me.

like image 335
Vladislav Belousov Avatar asked Jan 25 '26 15:01

Vladislav Belousov


1 Answers

There is a playwright library for network idle wait.

await page.waitForLoadState('networkidle')

I hope this helps you.

like image 93
alfah Avatar answered Jan 29 '26 13:01

alfah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!