Is it possible to force the webdriver page to reconnect until an available connection is made? #2542
-
I live in a city where there is a lot of power outage, it takes about 10 minutes to get the connection back and I get parked at the error "× Navigating to WA" I didn't find a way to try to reconnect automatically, in that case I would have to reconfigure the "puppeteer" to do a refresh loop? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@GladistonXD navigation timeout is set to 30seconds automatically. You just want the session to sit there and wait for a connection? There really isn't any concept of "retries" when a navigation fails. I suggest implementing some sort of network check before starting the session. |
Beta Was this translation helpful? Give feedback.
-
Yes, I would like it to try to reconnect after a network failure until the internet comes back, I will try to create a network check before starting the library |
Beta Was this translation helpful? Give feedback.
-
I suggest trying this: https://www.npmjs.com/package/ping await the wa web url and then run the open-wa code once ping is successful. Once you've figured out the right code, please share here. Converting to discussion. thanks |
Beta Was this translation helpful? Give feedback.
-
I did it with 'dns.lookup' but I believe it can be improved, but it's functional
|
Beta Was this translation helpful? Give feedback.
I did it with 'dns.lookup' but I believe it can be improved, but it's functional