The Bot Process:
- Logs into a web app
- Grabs a transaction
- Scrapes data
- Creates an xls file
- Saves it locally
- Attaches the xls to the web app using an add file feature
- Then deletes file
- And then the bot grabs the next transaction and repeats the above steps.
This code works perfectly with version 2018.1 but when upgrading to 2018.4 the delete fails. It looks like the Browser has some sort of hook in the file not allowing the process to delete it. When I close the browser the file does disappear. So the delete is sort of waiting for the browser to release the file.
I cannot close the browser between transactions.
- Killing the excel process before the delete
- Closing the workbook
- Using autosave
- Using save activity
- Invoke method for garbage collection