Posted: 16 Jan 2018 6:10 EST Last activity: 5 Feb 2018 4:30 EST
Terminate Runtime method taking a long time to execute and close the automation
I have a windows form and a web application in my automation. Upon completion of forloop, the automation has to close the runtime, however, it is displaying the windows form and is stuck at that screen for minutes without closing the bot. How to handle this situation ? I guess its due to UI- thread blocking?
You might examine the log to determine what is happening between when you call the method and when it finally shuts down. Perhaps there is an application that is closing too slowly. You might try using the Process.Kill method to terminate that specific process (assuming that doesn't cause the application any issues). That would basically be like clicking "End Task" in Task Manager.
If you have adjusted any of the "Stop" properties of the adapter (they would appear in bold in the Properties window), you might change those back to the defaults as well.
Posted: 4 years ago
Posted: 2 Feb 2018 5:28 EST
Shivanshu Kapoor (ShivanshuK)
I have not observed it to not work in my experience, so I cannot speculate. I would suspect that some process is getting hung and the Process.Kill method is the only way to ensure they go away. I would try doing that to all of your adapter processes and their children before calling TerminateRuntime.