Password Encoder:
It is built-in tool in QTP to generate encoded string for
given password value
Navigation:
Ø Start menu
Ø All programs
Ø QTP
Ø Tools
Ø Select “Password Encoder”
Ex: write script to open 5th order number record
in “FR” application
Step 1: activate “FR” window
Step 2: select “Open Order…” option in “File” menu
Step 3: activate “Open Order” sub window
Step 4: set “ON” for “Order No.” check box
Step 5: enter value “5” in edit box
Step 6: click on “OK” button
Script:
Window(“FR”).Activate
Window(“FR”).WinMenu(“Menu”).select “File;Open Order…”
Window(“FR”).Dailog(“Open Order”).Activate
Window(“FR”).Dialog(“Open Order”).WinCheckbox(“Order
No.”).set “ON”
Window(“FR”).Dialog(“Open Order”).WinEdit(“Edit”).set “5”
Window(“FR”).Dialog(“Open Order”).winbutton(“OK”).click
Using “With” statements:
Using “With” statement in the script we can avoid writing
parent object in each step
Syntax:
With objectclass (“object name”)
.Method
“value”
------
-----
End With