I don't have a recovery scenario. but have a why to detect it. I check the
file size
See example code below:
'## Take screen print
<your_window_object>.CaptureBitmap tempFullStrPath,True
'## Empty screen print logic
'check file size
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(tempFullStrPath)
numScreenSize = f.size
Set fso=Nothing: Set f=Nothing 'close objects
*If numScreenSize < 8000 Then ' checks if the file is under 8000 Bytes
(7.8 KB)*
* '<add what ever logic you want to do when a blank
screen is detected>*
* ' I chose to add a prefix to a variable that would
indicate screen is likely empty/blank*
tempFullStrPath = "Empty " & tempFullStrPath
End If
On Friday, March 12, 2010 9:49:23 PM UTC-6, Pavan Turlapati wrote:
>
> Based on my experience, capturebitmap will give you a black image when
> your desktop is locked. Does anybody have an alternative for this.
>
>
> On Mar 12, 11:40 pm, Andrey <[email protected]> wrote:
> > oh, I meant "if NOT ..." statement
> >
> > On Mar 12, 8:26 pm, Andrey <[email protected]> wrote:
> >
> > > When you add a checkpoint verification step QTP generates the line
> > > like this:
> >
> > > <test object>.Check Checkpoint(<checkpoint>)
> >
> > > try modifying it this way:
> >
> > > if <test object>.Check (Checkpoint(<checkpoint>)) Then
> > > <root test object of your AUT>.CaptureBitmap <arguments>
> > > End If
> >
> > > On Mar 9, 12:54 pm, Manish Bhalshankar <[email protected]>
> > > wrote:
> >
> > > > Hi All,
> > > > I want to capture the screenshot of the application when a standard
> of table
> > > > checkpoint fails. How can it be done.
> >
> > > > --
> > > > Regards,
> > > > Manish
>
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.