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

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
pTowers18
Posts: 4
Joined: Mon Mar 09, 2020 2:14 pm

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

Post by pTowers18 » Mon Mar 09, 2020 2:32 pm

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6190
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » 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/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

pTowers18
Posts: 4
Joined: Mon Mar 09, 2020 2:14 pm

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

Post by pTowers18 » Mon Mar 09, 2020 3:54 pm

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6190
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Mar 09, 2020 4:20 pm

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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

pTowers18
Posts: 4
Joined: Mon Mar 09, 2020 2:14 pm

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

Post by pTowers18 » Mon Mar 09, 2020 4:41 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6190
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Mar 09, 2020 6:00 pm

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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

pTowers18
Posts: 4
Joined: Mon Mar 09, 2020 2:14 pm

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

Post by pTowers18 » Mon Mar 09, 2020 6:49 pm

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!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6190
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Mar 09, 2020 8:50 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration