09-03-2009, 05:28 AM
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
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
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