Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP & Putty
#1
Solved: 10 Years, 9 Months ago Big Grin 
Hi QTPKing/Basanth,

I am back again with aother question.Let me explain you my problem:

1. I have to launch putty via QTP. <completed>
2. I have to cd into some directory..<completed>
3. Change some values as....<this is where I have problem>
Password = SomeValue

My problem: I want to change the text SomeValue to some other value.

With GetVisibleText QTP is able to see the text "Password = SomeValue" so I did

Code:
getVisibleText = window("nativeclass:=PUTTY").GetVisibleText
    
    If Instr(getVisibleText,"Password = ")>0 Then

            window("nativeclass:=PUTTY").Type "Dt0005"

     End If

This code will just type "Dt0005". But ideally what I want is to Delete/Remove the existing value and enter the new value as

Password = "4jikloop" to Password = "Dt0005"

Please help me how to remove the existing value. How to instruct QTP to delete the value after "=" and enter new value.

Hope I explain my question clearly.

Thanks
Aditi
Reply
#2
Solved: 10 Years, 9 Months ago
Aditi -
Have you tried,
Code:
getVisibleText = window("nativeclass:=PUTTY").GetVisibleText
    
    If Instr(getVisibleText,"Password = ")>0 Then
            window("nativeclass:=PUTTY").click
             window("nativeclass:=PUTTY").Type " "
            window("nativeclass:=PUTTY").Type "Dt0005"

     End If

Let me know if it helps.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  System Reboots when Terminal emulator is configured for QTP 11 to automate putty mahesh 3 6,648 02-08-2013, 11:10 PM
Last Post: coolguy
Rolleyes QTP typing incorrect Text on PuTTY Window ShrikantBiradar3449 0 2,406 08-24-2012, 10:05 AM
Last Post: ShrikantBiradar3449
  QTP with Putty 0.60 sudha_abap 1 3,822 10-22-2008, 03:03 PM
Last Post: sudha_abap
  Putty automation with QTP9.5 Issues rjobs 2 5,983 09-23-2008, 06:01 AM
Last Post: rjobs

Forum Jump:


Users browsing this thread: 1 Guest(s)