How do I automatically close ui.vision and firefox browser and restart the macro on last csvRead line?

My macro runs based on a csv file - it reads lines and does things and loops the macro for each line in the csv. It may take hours to get through the whole csv but sometimes there are errors and I need to restart. I’ve read various posts on here about how you can taskkill your browser and ui.vision and restart the macro every 5 minutes. How exactly is this done? And how do I ensure that my macro starts reading the next csv line (rather than starting from the first csv line in the file)?
These are my thoughts so far: create a batch file to start firefox and start ui.vision macro via powershell. Then run the macro. Within the macro, there is a line to launch a second batch file in powershell that starts a 5 minute countdown timer and when it reaches 0, it does taskkill, and then it will play the first batch file to start the macro again.
1.) Is my thinking correct on this? 2.) How do I actually implement the correct set up? 3.) How do I ensure that the macro starts reading from the last csv line rather than starting from the beginning?

I did see this post so I imagine it is a similar set up but I don’t want to repeat test suites, I want to just close and reopen kantu

I’ve read a few posts by @newuserkantu who seems to have gotten this functioning but not sure on the exact setup. Anyone know how to reset kantu and chrome with batch? this script doesnt work - #4 by newuserkantu

This is not a simple work need more steps

  1. run macro via batch file or similar script (I prefer batch)
  2. run a macro with a few amount of loop to do
  3. at end of work save current csv line in a dedicated csv or save it every loop
  4. close browser (tab close or keyboard emulation)
  5. bath file start again browser, that read csv with current line and continue
  6. browser start from last line saved in csv

Alternative solution

  • Download firefox portable
  • Change in firefox ini config to allow multiple instance (set true)
  • split csv in 5 or 10 csv with a part of work
  • run 5 or 10 firefox portable with macro (batch file)
  • wait few minutes and enjoy your work :slight_smile: