Posts: 6
Threads: 3
Joined: Sep 2010
Reputation:
0
03-23-2011, 01:47 PM
Hi,
After executing the scripts by using the QTP, dynamically it should change the testdata.testdata stored in one Excelsheet.
for example we have the data in centralised excel sheet
ex:ORG FOR HP15
after Execution the testdata should be changed to ORG For HP16 Is it possible to do this by using macros in excel.
and
is it possible to change the Object repository logical name and Physical description of the objects after one iteration of execution with out any manual intervention.
please share your thoughts as soon as posssible.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-23-2011, 03:20 PM
Question 1: Yes macro is a possibility. But why use macro? You can do it through QTP. Write to excel using the Excel COM object.
Question 2: Objectrepositoryutil is an utility within QTP to programatically work with OR. You can step forward and traverse through the objects with the OR and modify their physical properties. However, instead of this tedious way, i suggest you use descriptive programming to dynamically change your object properties after iterations.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 6
Threads: 3
Joined: Sep 2010
Reputation:
0
03-23-2011, 03:26 PM
can you give the clear steps to write the excel using the COM object.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-23-2011, 04:27 PM
If you would have searched this forum you would have got it in no time.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 6
Threads: 3
Joined: Sep 2010
Reputation:
0
03-23-2011, 05:46 PM
Hi Basant,
I searched in the forum but i could not get the code. can you provide url or the code here, if its possible.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-23-2011, 06:25 PM
It is always better to learn forever then do it for today. If you go to
www.learnqtp.com , on to your right bottom most you will find a section called QTP with Excel. It is a three part series and should ladder you through your objective.
I am on the cell phone and it is not at all easy to paste the entire hyperlink. Please excuse.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.