10-05-2009, 06:35 PM
Hi,
U can generate the screenshots in the QTP generated report itself. Just follow the below code:
'just give the relative path
filename="C:\Documents and Settings\kspl601\Desktop\Sample\RFC-Screenshot1.bmp"
Browser("Browser").Page("Cool").CaptureBitmap filename,True
Reporter.ReportEvent micPass,"image","<<img src='" & filename & "'>"
'this will store ur screenshot in the QTP generated report as well as in ur desired location where u stored ur file
U can generate the screenshots in the QTP generated report itself. Just follow the below code:
'just give the relative path
filename="C:\Documents and Settings\kspl601\Desktop\Sample\RFC-Screenshot1.bmp"
Browser("Browser").Page("Cool").CaptureBitmap filename,True
Reporter.ReportEvent micPass,"image","<<img src='" & filename & "'>"
'this will store ur screenshot in the QTP generated report as well as in ur desired location where u stored ur file