t_nguyen
12 years agoOccasional Contributor
Defining Variables for a path in an explorer window
Hello, Here is a little background on my scenario:
I have recorded hundreds of scripts and what is common between these test scripts is they involve opening a explorer window and typing in a path such as: "P:\0001-Test Complete\Project\ProjectFile.txt"
The problem I have is that the "0001-Test Complete" folder stored centrally on a P drive will require a new code assigned every year. So as of next year the folder will need to be renamed to "0002-Test Complete". This will mean that I need to go through all my scripts and change what is typed into the explorer window to: "P:\0002-Test Complete\Project\ProjectFile.txt"
Is there an easier way I can do this such as defining once the path and then use it as a variable in all my scripts so that next year I only need to change it once and the variables defined in each script does the rest?
Thank you in advance for any assistance
I have recorded hundreds of scripts and what is common between these test scripts is they involve opening a explorer window and typing in a path such as: "P:\0001-Test Complete\Project\ProjectFile.txt"
The problem I have is that the "0001-Test Complete" folder stored centrally on a P drive will require a new code assigned every year. So as of next year the folder will need to be renamed to "0002-Test Complete". This will mean that I need to go through all my scripts and change what is typed into the explorer window to: "P:\0002-Test Complete\Project\ProjectFile.txt"
Is there an easier way I can do this such as defining once the path and then use it as a variable in all my scripts so that next year I only need to change it once and the variables defined in each script does the rest?
Thank you in advance for any assistance
- Hi Thanh,
You have to change the following statment with the ProjectSuitVariable.
comboBoxEx32["SetText"]("P:\\0001-Test Complete\\SFCL-13-62.502 - Test Complete\\");
comboBoxEx32["SetText"]("P:\\0001-Test Complete\\SFCL-13-62.502 - Test Complete\\");
Assuming that , you have defined a ProjectSuit Variable named PV_var and assingned "P:\\0001-Test Complete\\SFCL-13-62.502 - Test Complete\\" value to it.
So your code would be like this
comboBoxEx32["SetText"](ProjectSuit["Variables"]["PV_Var"]));
[There might be few syntax erros in the above code as I do not have TC right now with me.]
For more information , please refer the link below:
http://support.smartbear.com/viewarticle/28298/