Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP - each step screenshot bitmap in to word
#1
Not Solved
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


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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Scripts stops after performing a step when it has been initiated by schedule task. Ajit.2k6 9 5,973 02-16-2016, 08:37 PM
Last Post: lakshman.us
  Header and Footer in word doc anupam4j 0 2,529 10-10-2014, 01:26 PM
Last Post: anupam4j
  capture screenshot using html code and view in QTP Test results Bhuvan 3 7,276 07-19-2013, 02:38 PM
Last Post: Bhuvan
  [ QC& QTP] issue with Qc design step parameter seritalien 0 1,933 05-29-2013, 06:56 PM
Last Post: seritalien
  Generate Word document phabloxar 3 3,889 08-29-2012, 07:34 PM
Last Post: phabloxar

Forum Jump:


Users browsing this thread: 1 Guest(s)