How can we bring the Direct Connection terminal window to the front?

You ever fight with something so long that you lose all ability to think clearly about it? That’s such a simple solution. I couldn’t figure out how to get the UiPath terminal window to be open AND be able to indicate element from the activity (since to get the terminal window, the automation has to be running).

So here’s how to do it specifically…

  • Create a test XAML and set up a Terminal Session (make sure to set it not to close)
  • Put a Log Message activity after the Terminal Session and set it as a breakbpoint
  • Open Ui Explorer
  • Debug File
  • When it stops on the Log Message activity the terminal window will be open
  • Indicate Element in Ui Explorer and get the selector

This is the resulting selector…

<wnd app='uipath.executor.exe' cls='HwndWrapper*' title='Connection: aaaaa.com' />

Obviously I edited out our server name. I’m going to try just wildcarding after “Connection:” since we have more than one mainframe server our automations connect to. But I could also dynamically include the server in the selector.

In modern, this is how to bring it to the front, just paste in the selector…

image