Micro Focus QTP (UFT) Forums

Full Version: CaptureBitmap - File name from Data Table
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In using CaptureBitmap function

1. File names have to be taken from a DataTable value

Can any body help me out with syntax?
-------------------------------------------------------------------------
Code:
Browser("Google").Page("Google").CaptureBitmap("english.bmp")
Reporter.ReportEvent micDone,"lang name","lang desc","english.bmp"


Values in the Data Table as

English
french
German
polish
-----------------------------------------------------------------------




Thanks in Advance
Nagappan
Hi,

Try the following:
Code:
Dim fileName
fileName = DataTable.GlobalSheet.GetParameter("FileName") & ".bmp"
Browser("Google").Page("Google").CaptureBitmap(fileName)
Reporter.ReportEvent micDone,"lang name","lang desc",fileName

Rename the column of DataTable as FileName in which your values are stored.
Two questions,
1. Where would it store?
2. Why use variable fileName?
Thanks a lot guys.
Nag
Hi Basant,

You are right. We can use: CaptureBitmap(DataTable.GlobalSheet.GetParameter("FileName") & ".bmp")