-
Junior Member
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
-
Expert Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules