Prepare for your Next Interview
This is a discussion on How to capture screen during run-time within the QTP forums, part of the Software Testing category; Hi, I need help. During running a test, how can I capture a screen? Can anyone give me instructions or code of how to capture screen during run-time? Thanks...
|
|||
|
How to capture screen during run-time
Hi,
I need help. During running a test, how can I capture a screen? Can anyone give me instructions or code of how to capture screen during run-time? Thanks |
| Sponsored Links |
|
|||
|
Re: How to capture screen during run-time
Hi,
you can use object.captureBitmap"ScreenShot.bmp" method to capture the screen shot at run time. Below example will help you to get familiar with this. '''Prerequisites: Open the FlightReservation Login screen. ''then runthis program Set Dlg= Dialog("text:=Login") Set wnd=Window("text:=Flight Reservation") Set oDlg=wnd.Dialog("text:=Open Order") Dlg.WinEdit("attached text:=Agent Name:").set "rajaputra" Dlg.WinEdit("attached text:=Password:").setsecure"mercury" Dlg.WinButton("text:=OK").click wait(7) wnd.Activate wnd.WinButton("window id:=5").click oDlg.WinCheckBox("text:=&Order No.").set "ON" oDlg.WinEdit("window id:=1016").set "100" oDlg.WinButton("text:=OK").click if(oDlg.Dialog("text:=Flight Reservations").Exist) then oDlg.Dialog("text:=Flight Reservations").CaptureBitmap"c:\snapshot1.bmp" oDlg.Dialog("text:=Flight Reservations").WinButton("text:=OK").click oDlg.WinButton("text:=Cancel").click end if wnd.Close ____________ Regards, Arun Singh Rajaputra |
| The Following User Says Thank You to rajaputra For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Capture color value of any pixel on your PC screen. | JobHelper | Geeks Lounge | 0 | 03-14-2008 04:10 AM |
| View, zoom, capture, enhance, and rotate any section of your desktop screen. | JobHelper | Geeks Lounge | 0 | 02-23-2008 07:00 AM |
| Screen recorder to save your time and cost to create software tutorials, presentation | JobHelper | Geeks Lounge | 0 | 11-28-2007 03:00 AM |
| TNT Screen Capture creates screen shots that look better than the original screen. | JobHelper | Geeks Lounge | 0 | 08-17-2007 09:10 AM |
| Capture the screen shot of the application | JobHelper | WinRunner | 3 | 04-19-2007 06:10 AM |