Forum Discussion

IMol's avatar
IMol
Occasional Contributor
9 years ago

Error Message: Can not create TestComplete object

Hi

 

I've opened one of the C# samples, Hello, because I'm creating a Connect Application. However, when I click on the execute button, I get this error message:

 

System.Exception: Can not create TestComplete object.
at AutomatedQA.script.var.GetObjectAlternative(String Name, String AlternativeName)
at AutomatedQA.TestComplete.Connect.TBaseTCClass.GetTestCompleteIntegration()
at AutomatedQA.TestComplete.Connect.IntegrationClass.Init()
at AutomatedQA.script.var.get_Item(String name, var[] args)
at AutomatedQA.TestComplete.Connect.RunTest(String LogName, String ProjectName, String SuiteName)
at TC_CS_Tester.Form1.button1_Click(Object sender, EventArgs e)

 

This is the problem line:

 

TestClass.RunTest("TestLog", "Hello_C#_C#Script", Application.StartupPath + "\\..\\..\\TCProject\\Hello.pjs");

 

I'm using TestComplete 11.30.2298.7 on Windows 8.1. I've tried it on both Visual Studio Express and Community 2013. I've tried it with TestComplete open and closed. I've also tried it in administrator mode, but to no avail. This also happens with every other sample project. Is there a setting I'm missing?

 

I've also attached the messagebox that comes up when I click Execute.

 

Thanks.

Ipeleng

  • IMol's avatar
    IMol
    Occasional Contributor

    I got the error from the Visual Studio error handler:

     

    System.Exception was unhandled
    Message=Can not create TestComplete object.
    Source=AutomatedQA.script
    StackTrace:
    at AutomatedQA.script.var.GetObjectAlternative(String Name, String AlternativeName)
    at AutomatedQA.TestComplete.Connect.TBaseTCClass.GetTestCompleteIntegration() in D:\Builds\TC11.3\Src\TC\ConnectedApp\dotNet\CSConnectedApp\ConnectedApps.cs:line 29
    at AutomatedQA.TestComplete.Connect.IntegrationClass.Init() in D:\Builds\TC11.3\Src\TC\ConnectedApp\dotNet\CSConnectedApp\ConnectedApps.cs:line 52
    at AutomatedQA.script.var.get_Item(String name, var[] args)
    at AutomatedQA.TestComplete.Connect.RunTest(String LogName, String ProjectName, String SuiteName) in D:\Builds\TC11.3\Src\TC\ConnectedApp\dotNet\CSConnectedApp\ConnectedApps.cs:line 533
    at Hello.Form1.button1_Click(Object sender, EventArgs e) in c:\Users\Public\Documents\TestComplete 11 Samples\Desktop\Connected Applications\Hello\C#\Form1.cs:line 109
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at Hello.Form1.Main() in c:\Users\Public\Documents\TestComplete 11 Samples\Desktop\Connected Applications\Hello\C#\Form1.cs:line 104
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:

     

    Which folder is D:\Builds\TC11.3\Src\TC\ConnectedApp\dotNet\CSConnectedApp\ConnectedApps.cs, or where can I perhpas change where it's looking for this file? 

     

    Thanks.

     

    IMol