Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Screenshots - Beginner Question
#1
Not Solved
Hi,

I'm new to QTP and have written a function to take a screenshot of an application window and add it to the QTP results file. Here is the code:

Code:
Sub CaptureScreenshot( ByVal strName, ByVal strWindow )

    Dim path_error_file
    path_error_file = "C:\" & strName
    Window(strWindow).CaptureBitmap path_error_file,True
    Reporter.ReportEvent micFail, object_snap, "&amp;<img src='" & path_error_file &"'>"

End Sub

My problem is that the above code works, but my tests are marked as Fail because I use 'Reporter.ReportEvent micFail'. My screenshots get added to the report fine.

But - When use 'Reporter.ReportEvent micPass' or 'Reporter.ReportEvent micInfo', my screenshots get taken and saved, but don't get added to the report file.

Can anybody help me?

Thanks,
Jimmy
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Question about QTP tutorial - Yousuf 1 2,470 11-15-2013, 09:25 PM
Last Post: Yousuf
  qtp interview question raaj123 2 2,277 01-21-2013, 03:12 PM
Last Post: Ankesh
  QTP 10's Object Repository Checkpoints and Output Objects question Tonya S 2 4,885 09-09-2011, 02:09 AM
Last Post: Tonya S
  QTP AOM related Question - need solution prodipto_dutta 6 9,020 05-04-2011, 05:31 PM
Last Post: prodipto_dutta
  QTP and VBscript - noobie question gplayer 0 2,367 03-11-2011, 06:50 PM
Last Post: gplayer

Forum Jump:


Users browsing this thread: 1 Guest(s)