Forum Discussion

marina_kachko's avatar
marina_kachko
Occasional Contributor
11 years ago

Creating Self-Testing Application Error

Hi, 

I read your guide about how to create Self-Testing Application by copying the script I get in test complete to visual studio and editing it from JScript to C#. You wrote in your'e help documents that I need to add "using AutomatedQA.TestComplete.Connect" but I get an error "Error 1 A using namespace directive can only be applied to namespaces; 'AutomatedQA.TestComplete.Connect' is a type not a namespace C:\Users\Marina.Kachko\AppData\Local\Temporary Projects\Project1\Class1.cs 5 7 Project1".


I don't know what to do because if I remove it, it doesn't recognaize my app. for example:

"TestedApps.ServoStudio_IM.Run();" and I get the error : "Error 2 'AutomatedQA.TestComplete.Connect.TestedAppsClass' does not contain a definition for 'ServoStudio_IM' and no extension method 'ServoStudio_IM' accepting a first argument of type 'AutomatedQA.TestComplete.Connect.TestedAppsClass' could be found (are you missing a using directive or an assembly reference?) C:\Users\Marina.Kachko\AppData\Local\Temporary Projects\Project1\Class1.cs 37 24 Project1




please advice,

Thank you,

Marina


"

 
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Marina,

     


    AutomatedQA.TestComplete.Connect is a class that will help you connect to TestComplete objects. You need to add the AutomatedQA.script and AutomatedQA.TestComplete.CSConnectedApp DLLs to your C# project and specify the following namespaces in a source file:




    using AutomatedQA.TestComplete;


    using AutomatedQA.script;




     


    Please read the "Creating Self-Testing Applications in C#" article for details.


     


    Does this resolve the issue?

  • marina_kachko's avatar
    marina_kachko
    Occasional Contributor
    I would like to explain myself maybe you didn't understand me.

    I followed the instruction in the article and got this errors and I don't know how to continue.

    There is some instruction that you wrote that I should write them in the visual but I get a mistake.



    thank you for your help,

    Marina Kachko