Hi Nalini,

CaptureBitmap() method requires mandatory argument "The Path of File". I can
see that u have just mentioned the name of the file and did not give the
path, where the file has to stored.

*Syntax for Capture Bitmap Method is :

*<Object Hierarchy>.CaptureBitmap "<Path of  File>"[,<Mode>]
Mode may be True or False this is optional

Modify your code as
WpfWindow("Window Name").Activate
WpfWindow("Window Name").CaptureBitmap "D:\Window2.bmp",True

This will work for u.

regards
Siva.k

Hi Nalini,
>
> Try using *Desktop.CaptureBitmap()*
>
> Regards,
> Manish
>
> On Wed, Jul 15, 2009 at 6:46 PM, Nalini <[email protected]> wrote:
>
>>
>> We are unable to take Bitmap/screenshot of our application window
>> using QTP10.0
>>
>> We have used the below code to capture the screens, but it results
>> with the screen shot of the QTP window not with the application
>> window.
>>
>> WpfWindow("Window Name").Activate
>> WpfWindow("Window Name").CaptureBitmap "Window2.bmp"
>>
>> Can anyone in the group look into this issue and help us resolve the
>> problem as soon as possible.
>>
>>
>> Machine Configuration Used:
>>
>>
>> OS: Windows XP Professional
>>
>> QTP Version: 10.0
>>
>> Addin Used: Dot Net 3.5, WPF
>> >>
>>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to