1. How to capture data from images in QTP and produce them
in Excel sheet

Answer Posted / pravati

x=Browser("").page().image().Getroproperty("alt")
set excel=createobject("excel.application")
excel.application.visible=true
excel.workbooks.add
excel.activeworkbook.saveas ("path.xlsx")
excel.workbooks.open("path".xlsx)
set mysheet=excel.activeworkbook.worksheets("shtid")
mysheet.cells(1,1).value=x
excel.activeworkbook.save
excel.activeworkbook.close
excel.application.Quit
set mysheet=nothing
set excel=nothing

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can i compare two databases using QTP ?

1873


What is throw object?

1737


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

2442


What are the different recording modes?

556


What is the basic concept of quicktest professional (qtp)?

573






What contains Data Driven Framework document in qtp?

1455


What is debugging? How you debug your script?

602


what is the hierarchy to use properties in descriptive programming

1493


How QA specialist can identify when programmatic descriptions are useful?

1964


am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)

1273


How to handle dynamic objects in quicktest professional?

494


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1701


Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)

1546


How qtp recognizes the object?

663


What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

3483