Forum Discussion
Here is a suggested solution:
We suggest you create a function and parameterize the file that is being called
function main(){ sub("c:\\myfile") } function sub(file_path){ }
I pasted the above directly into a script file. Now when I "insert" the "sub" script routine in a keyword test, I'm prompted for the value. See the attached Word doc with screenshots of how I set it up.
I'm not sure what to do from here. How will the remaining script routines that I pull over into the main keyword test know to use the file I pointed to? I'll need to specify the columns for each control to use.
Very familiar with doing a dataloop in a keyword test, but not this way.
Can I please get some hand holding from you gurus? :)
You can use a function if you want it to prompt you all the time but if you want to set the path once and change it occasionally, then put the path into a project variable of type string and use that variable in your other functions.
In the case of your example you could call the variable FilePath and its value would be c:\\myfile