08-31-2011, 04:28 AM
Hi Ashita,
Here are the steps you need to follow:
1. Open QTP. (Select ActiveX and Visual Basic from home screen)
2. Open Flight Application (For Example: "E:\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe")
3. Click "Record" button in QTP (You can find it in top left corner of the screen or simply Press "F3" key or Goto Automation Menu >> Record.
4. "Record and Run Settings" window will open. (Select "Window Application" tab)
5. By default first radio button will be selected.
6. Click ok (Now QTP will be in recording mode)
7. Select "Flight Login" dialog from taskbar or by pressing Allt+Tab
8. By default cursor will be blinking at "Agent Name" text field.
9. Enter Agent Name
10. Click on Password with the help of mouse. (Please dont hit 'Tab' key. Please avoid keystrokes when using QTP or LoadRunner)
11. Enter password as "mercury"
12. Click on "OK" or "Cancel" as per your requirement. (Here for demo purpose I choose "Cancel")
13. Click on "Stop" button or press "F4" to stop recording.
14. If you followed above steps, then you can see below script generated in "Expert View" in QTP
Please reply whether its worked or not. If not, then please mention clearly the method you are following when recording.
Regards,
- Forrest Gump
Here are the steps you need to follow:
1. Open QTP. (Select ActiveX and Visual Basic from home screen)
2. Open Flight Application (For Example: "E:\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe")
3. Click "Record" button in QTP (You can find it in top left corner of the screen or simply Press "F3" key or Goto Automation Menu >> Record.
4. "Record and Run Settings" window will open. (Select "Window Application" tab)
5. By default first radio button will be selected.
6. Click ok (Now QTP will be in recording mode)
7. Select "Flight Login" dialog from taskbar or by pressing Allt+Tab
8. By default cursor will be blinking at "Agent Name" text field.
9. Enter Agent Name
10. Click on Password with the help of mouse. (Please dont hit 'Tab' key. Please avoid keystrokes when using QTP or LoadRunner)
11. Enter password as "mercury"
12. Click on "OK" or "Cancel" as per your requirement. (Here for demo purpose I choose "Cancel")
13. Click on "Stop" button or press "F4" to stop recording.
14. If you followed above steps, then you can see below script generated in "Expert View" in QTP
Code:
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "forrest"
Dialog("Login").WinEdit("Password:").SetSecure "4e5d6a8e3c95d0b55b8d07a54411012a0a6f2821"
Dialog("Login").WinButton("Cancel").Click
Please reply whether its worked or not. If not, then please mention clearly the method you are following when recording.
Regards,
- Forrest Gump