I'm using TestComplete 6 at the moment. I'm trying to connect to TestComplete Server via the following VBScript(WSH) call :
Set TestCompleteObject = CreateObject("TestComplete.TestCompleteApplication ")
If TestComplete is not already running, this seems to work fine. However, if TestComplete is already running, it tries to relaunch TestComplete again !! Which causes an error because only one instance of TestComplete is allowed.
I actually tried monitoring the Windows task manager, and I can see a second instance of TestComplete appearing just before the error message is displayed.
Is there an option I need to set such that if TestComplete is already running, that it does not relaunch it, and just connect to the currently running instance ?
This happened to me too. I believe that you are trying to do the VB script from TestComplete itself. If that's the case, then you will get this error (I did the same thing !!!). When called from an external script (example...from visual studio), this works great and I learnt that it was designed to be called from externally.
1. The script should obviously be called externally, not from TestComplete.
2. You can also try using the "TestComplete.TestCompleteApplication.6" ProgID if you face problems when creating the object.
Thanks to all replies. I was trying to launch it from an external VBScript. TestComplete always re-launches with CreateObject() call. However, IN2ITve's suggestion seems to work, if TestComplete is already up.