Is there a way to kill terminal session without close UiPath executor. I use direct connection to connect to terminal
If you are using the UiPath Terminal Activities, try adding the “Close Connection” activity at the end of your workflow. This will safely disconnect the terminal session without affecting the UiPath executor.
If nothing else works, you can use the “Kill Process” activity targeting the specific terminal process (e.g., cmd.exe, powershell.exe, putty.exe, tn5250.exe, etc.), but this is not the recommended way as it might cause unintended issues.
Hi @quick_123,
When using the Output/Existing Connection options for the Terminal Session activity, it is up to the developer to close the session when it’s no longer needed. The best practices for terminal automation describe how you can do that.
The connection cannot be closed automatically in this case since we have no way of knowing if it will be needed further in the execution.
The Direct connection provider runs inside the executor so there is no way to “kill” the connection.
Could you please let me why this particular error coming,
I built the bot on lower version of terminal package and I had also upgraded the package but randomly we get this error- “Set Field at Position”: Terminal error: ErrorWaitReady.
Inspite of delay, the screen is just blank like this
The ErrorWaitReady can happen if the terminal keyboard is marked as “locked” which can happen if you tried to write text to a protected field.
So it’s possible that some operation prior to the SetFieldAtPosition has failed and caused the keyboard to get locked.
So I suggest to check the execution before the SetFieldAtPosition, check that the data sent to the terminal is being sent. Note that using the debugger to follow the execution is unreliable because it locks the UI thread and the terminal viewer cannot update with the changes on screen. So try normal execution with some delays that allows you to follow the screen changes.
Another thing you could try is to replace the SetFieldAtPosition with MoveCursor followed by SendKeys
Hi @quick_123
The ErrorWaitReady occurs when the terminal keyboard is locked, often due to writing to a protected field. Check the operations before SetFieldAtPosition to ensure data is being sent. Avoid using the debugger, as it locks the UI thread. Instead, try using MoveCursor and SendKeys instead of SetFieldAtPosition to prevent the issue.
If You found helpful, feel free to mark as a solution!
if that is the case, then the bot should in all instances, if fails randomly and its successful as well.
only During the failure, when look into the screenshots I see that Terminal is blank
The Terminal is blank and no elements are loaded
