Page 1 of 1

Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 2:32 pm
by pTowers18
I am currently utilizing PUTTY in my automation development and I am currently having problems how to select a line of text of a single word. Does anyone have an idea or experience regarding this matter? My goal is to get the selected line/word and use it in my validation.

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 2:47 pm
by odklizec
Hi,

I'm afraid, there is no way to interact with putty terminal window. Ranorex (any test automation tool) is not able to track or manipulate individual terminal window elements (lines). The only thing what you can probably do is to export putty window to text file and validate its content via code. You can find how to export putty output to file here:
https://www.urtech.ca/2016/10/solved-ex ... ing-putty/

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 3:54 pm
by pTowers18
odklizec wrote:
Mon Mar 09, 2020 2:47 pm
Hi,

I'm afraid, there is no way to interact with putty terminal window. Ranorex (any test automation tool) is not able to track or manipulate individual terminal window elements (lines). The only thing what you can probably do is to export putty window to text file and validate its content via code. You can find how to export putty output to file here:
https://www.urtech.ca/2016/10/solved-ex ... ing-putty/
Thanks for the response. I just have some clarifications though. Are you referring with mouse interaction? I agree. What I'm trying to achieve is to edit a file which we have account permission to. My challenge is that I can't find my way to get the cursor to the correct location as preceding line can change any moment.

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 4:20 pm
by odklizec
Hi,

Could you by more specific? What file exactly you want to edit and in what editor? Please post step by step instructions, ideally, with screenshots.

As I mentioned before, there is no way to interact with putty’s command prompt. Ranorex simply cannot track individual lines or read the content of command prompt window. So anything you want to do with putty, must be done via command line parameters and eventually edit file (via code) before it’s used in putty (most probably passed also via command line parameters).

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 4:41 pm
by pTowers18
I may just be confused or lost with my questioning but what I want to achieve is to change "12H" to "1M". Now I understand that even is Ranorex may have a mouse press capability, I don't know how to specifically place it via putty which it may not have such interaction with the application.

Image

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 6:00 pm
by odklizec
Hi,

Exactly what I thought. Ranorex simply cannot interact with this window. There is no way to tell where exactly to click with mouse in this window or read the content of this window. So I’m afraid, you will have to find another way to achieve what you want (without putty).

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 6:49 pm
by pTowers18
Got it. We're just hopeful, somebody had this kind of problem. But seems like what we've deliberated as a limitation won't have a workaround other than utilize another application.

Thanks for the responses you've made!

Re: Highlighting (select + drag OR double click) a whole line of text in PUTTY

Posted: Mon Mar 09, 2020 8:50 pm
by odklizec
Hi,

If you are hoping for another UI based TA app (like Ranorex), then I’m afraid, you will not find any. Simply, the terminal window is not interactive and written with UI testing on mind. Your only hope is to write a bash script, for example using Expect command, which can help you with terminal interaction. But you will definitely not find anything like Ranorex capable of UI terminal automation.