I dont know if this is the best way to approach this so any help is appreciated.
We are running two sets of reports from two builds to ensure that the latest build hasnt broken anything. I need to pass in variables for the file names and file locations etc and thought that using the Project Suite variables page would be a good place. When I run my script however it does not pull in the variables from the suite. I cant find any help pages or samples that actually show how you use the variables. What have I missed?
If there is a better way of doing this then please let me know, although I still want to know how to get the variables to work!
>>>I cant find any help pages or samples that actually show how you use the variables
Please see the "Local Variables" and "Working With Local Variables in Scripts" help topics. If this suggestion does not help you solve the problem, please zip your entire TestComplete project suite folder along with the failed test execution log and send the archive to us via our Contact Support Form (http://www.automatedqa.com/support/message.asp) so we can investigate the problem on our side.
Thanks for that. I did find the relevant help pages and somehow worked out how to get the variables added in the script and set the values.
I now need to retrieve the values to use but the values are null.
Example using VB:
'Project.Variables.AddVariable "folder", "String"
'Project.Variables.AddVariable "file1", "String"
'Project.Variables.AddVariable "file2", "String"
There is no way to address project variables directly by their names because their names can coincide with the names of your script variables. Therefore, you always need to use the Project.Variables.MyVar notation. Besides that, the file names you are using are incorrect: you are comparing "C:\Dummytest rpt b4 csv.xls" with "C:\Dummytest rpt After csv.xls".