Forum Discussion

sbkeenan's avatar
sbkeenan
Frequent Contributor
14 years ago

Error after TC8 Upgrade

Hi



I've recently upgraded to TC8 and tried to execute some scripts.



My main script routine uses the 'USEUNIT line at the very beginning of the script to include another script file.  It all worked in V7.52 but now I am getting a VBScript runtime error of 'Name redefined.'



It is referring to line 1 of the script, but this line is just a comment line like this:



    '******************



Even if I remove all the comments from the beginning of the script file, I get the same error.



Can anyone offer any suggestions?



Many thanks.



Regards

Stephen.

1 Reply


  • Hi Stephen, 





    It seems that your problematic script routine name coincides with the name of a VBScript class defined in the routine. We are aware of this behavior. 

    TestComplete 7 did not check that and this could cause ambiguity in some situations, so TestComplete 8 now checks this. The error message prevents problems which are hard to diagnose, e.g. when you type the problematic script routine name and it is not clear what the identifier means, since this name can be both a script unit name and a class name. We will make the error message more clear in one of future releases. In the meantime, we recommend that you rename the problematic units and change the corresponding USEUNIT statements (you can use the Find and Replace feature to do this).