The best way to open and close automatically at a specified time to prevent memory leaks(VBscript)

The way I do it is to close & restart the browser after e. g. 100 macro runs.

And my code checks the command line for timeout (no response, e. g. because browser is frozen or crashed). If there is a timeout due to browser or UI Vision hanging it kills all Chrome instances. Then automatically (by UI Vision) on the next command line call Chrome is started again.

Basically I use the code from the RPA Github repo , it has all the checks I mentioned:

1 Like