02-07-2018, 10:06 PM
Hi Experts,
I'am new to UFT and handling a project to regression test of mainframe. I wanted to capture specific screens I navigate in mainframe in to a word file for each iteration (each request in my case). Below is the limitations I have in my workplace..
TE addin only supports IBM PCOMM (I have TE Addin but no PCOMM instead have hummingbird), so my idea to identify object and test was ruled out.
So what I did was to write VBS,
1.Loop through request number through excel
2.input the request in hummingbird
3. Navigate using send keys
4.capturebitmap using bitmap code of the TEWindow (Which is the only object recogonized by QTP)
5. second inside loop to loop through navigations
The solution I need is how I can paste the bitmap in word for each navigation page (loop) one by one below and end the bitmap loop with a document saved (one doc for one request). And the next loop of request begins for next iteration.
Appreciate your help.
Thanks,
Bala
I'am new to UFT and handling a project to regression test of mainframe. I wanted to capture specific screens I navigate in mainframe in to a word file for each iteration (each request in my case). Below is the limitations I have in my workplace..
TE addin only supports IBM PCOMM (I have TE Addin but no PCOMM instead have hummingbird), so my idea to identify object and test was ruled out.
So what I did was to write VBS,
1.Loop through request number through excel
2.input the request in hummingbird
3. Navigate using send keys
4.capturebitmap using bitmap code of the TEWindow (Which is the only object recogonized by QTP)
5. second inside loop to loop through navigations
Code:
Const heEnter = "@E" 'Enter
Const hepf3 = "@3" 'F3 key
Const hepf5 = "@5" 'F5 key
Const hepf6 = "@6" 'F6 key
Const hepf2 = "@2" 'F2 key
Const hepf9 = "@9" 'F9 key
Const hepf8 = "@8" 'F9 key
Const heTab = "@T" 'Tab
Const heDelete = "@D" 'Delete
Set HostExplorerApp = CreateObject("HostExplorer")
Set h = HostExplorerApp.currenthost
h.Show
h.Activate
Rem open the excel workbook where we have the req numbers
Dim lr
set excel = createobject("excel.application")
Set wb = excel.Workbooks.Open("\****\**.xlsx")
excel.Visible = True
rem set the active sheet and count of req to loop
Set ws1=wb.Sheets("Sheet1")
lr = ws1.usedrange.rows.count
For i = 2 To lr Step 1
dd=ws1.cells(i,1)
aaf=ws1.cells(i,2)
h.puttext "1", 8, 8
h.keys heEnter
h.puttext dd, 5, 16
h.puttext aaf, 5, 33
h.keys heEnter
h.puttext "S", 9, 3
h.keys heEnter
TeWindow("TeWindow").capturebitmap("\****\**.png")
reporter.ReportEvent micDone, "***","***","\****\**.png"
Next
The solution I need is how I can paste the bitmap in word for each navigation page (loop) one by one below and end the bitmap loop with a document saved (one doc for one request). And the next loop of request begins for next iteration.
Appreciate your help.
Thanks,
Bala