Posts: 64
Threads: 17
Joined: Nov 2009
Reputation:
0
06-10-2010, 10:05 AM
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
Posts: 127
Threads: 9
Joined: Apr 2010
Reputation:
0
06-10-2010, 11:02 AM
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.
Posts: 64
Threads: 17
Joined: Nov 2009
Reputation:
0
06-10-2010, 12:16 PM
Could you show me the details of your solution?
Posts: 127
Threads: 9
Joined: Apr 2010
Reputation:
0
06-10-2010, 01:24 PM
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.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
06-10-2010, 02:07 PM
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.
Posts: 64
Threads: 17
Joined: Nov 2009
Reputation:
0
06-14-2010, 09:48 PM
done.
Many thanks guin.anirban