For security reason (IPC error or kantu is not connected to browser tab) I run macro automations for few minutes, after it close browser and batch file run another firefox + ui vision
In this mode if I have a problem (random bug), browser will be closed periodically and new firefox work again.
There are some bugs not solved in ui vision (IPC error or kantu is not connect to browser tab) to avoid this bugs I close and restart periodically browser with automation
There are a large amount of stranges and random error in ui vision the secure way is running short macro code and close periodically browser and restart and with batch file (or powershell) you can do this.
If i run a macro that work 2 hours and after show IPC error I lost 2 hours for nothing.
If i running a macro of 5 minutes and after show error (kantu is not connected of tab browser) i lost 5 minutes for nothing.
Restarting browser periodically i can continue the work.