Results 1 to 2 of 2

Thread: How to capture screen during run-time

  1. #1
    Junior Member
    Join Date
    May 2008
    Answers
    10

    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


  2. #2
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact