Take a Screenshot in Terminal?

Hi,

So I am using terminal activities to access an AS400. The process gets to a specific area and I need to take a screenshot of that terminal window only. Do you have a suggestion on how to do that? Tried “Take Screenshot” and “Send Hotkey” and none of them worked for me.

Thanks in advance

Hi @NJ_98 ,

Can you try this?

InvokePrintScr

Thanks

Take screenshot works fine as long as the terminal window is on top.

If it’s not on top, you’ll have to attach (or User App/Browser if modern) to it and activate it.

1 Like

It didn’t work - is it supposed to go to screenshot folder? if yes, it’s empty so I guess it didn’t work

Well the terminal (to connect to AS400) is open only when it’s running and there’s no way for me to catch. I also tried not defining a selector but still didn’t work

No. Take Screenshot just puts the image into a variable. You have to use Save Image to actually save that variable’s data to a file.

1 Like

@NJ_98
use “take Screenshot” activity and declare variable in the output panel.
Use "Save image " activity for saving the image on the desired location.

Hey, thanks for the reply - the problem with this solution is that I am using terminal sections to access AS400 and it’s only visible when I am running the bot - so I don’t know how to catch for the selector

Set a breakpoint on an activity right after the terminal window opens, and use Debug mode. When the automation pauses, open Ui Explorer and use it to get the selector for the terminal window.

It worked - thanks so much

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.