Geeks Talk

Prepare for your Next Interview




How to capture screen during run-time

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...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-14-2008
Junior Member
 
Join Date: May 2008
Location: dc
Posts: 15
Thanks: 4
Thanked 1 Time in 1 Post
test.ing59 is on a distinguished road
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-17-2008
Contributing Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 90
Thanks: 1
Thanked 13 Times in 13 Posts
rajaputra is on a distinguished road
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
Reply With Quote
The Following User Says Thank You to rajaputra For This Useful Post:
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

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


All times are GMT -4. The time now is 06:14 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved