Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to config the data file path(xls)
#1
Solved: 11 Years, 4 Months ago
Hi all,

First pls see that attached file. I use the excel file as the data file. In every scripts, i have to set the Parameter "sDataFilePath = C:\QTPAutomation\CyBer\DataTables\English\data.xls".
Does anybody have any solutions that don't have to set this parameter in any scripts? That's mean only one step to config to all scripts use this data file.

Thanks,
linhke
Reply
#2
Solved: 11 Years, 4 Months ago
Either you can use environment variable or you can define the path as a constant. And use that variable through out of all your actions. Further if you need to change the path then change only the value of environment variable or constant.
Reply
#3
Solved: 11 Years, 4 Months ago
Could you show me the details of your solution?
Reply
#4
Solved: 11 Years, 4 Months ago
Hi,

According to my solution you also have to define the path in each and every actions. But in future if you need to modify the path then you just change the path defined in the environment variable or constant and no need to change the path of each and every actions. Mean to say define once and later do only modification in the path.

For defining environment variable you have go to Settings>Environment>User defined
There you can load your external XML or you can specify the name and value of your variable.

For defining constant put the constant value in your function library and use it in your action.
Reply
#5
Solved: 11 Years, 4 Months ago
linhke -
Did you try if the AOM has anything to offer ?
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.
Reply
#6
Solved: 11 Years, 4 Months ago
done.
Many thanks guin.anirban
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Save data from pdf file to a word doc Amar 0 2,637 12-12-2013, 12:29 PM
Last Post: Amar
  VBScript Certification Path qapandit 0 2,910 09-10-2013, 04:13 AM
Last Post: qapandit
  Send Data from MSWord document 2 Excel File kisskasa 0 2,857 01-10-2012, 01:51 PM
Last Post: kisskasa
  Share xls file between many QTP scripts adam12 3 3,614 08-07-2011, 09:41 PM
Last Post: Tarik Sheth
Exclamation QTP result in .xls file....Need Help... souvikghosh_diatm 7 7,923 07-20-2011, 11:42 AM
Last Post: souvikghosh_diatm

Forum Jump:


Users browsing this thread: 2 Guest(s)