Forum Discussion

DKumar04's avatar
5 years ago

Unable to add methods as 'Test Items' when methods actually are actually written inside the class

This is important to my project All my methods are written inside class This actually creates a problem as I am not able to call methods on project 'Test Items' page    
  • tristaanogre's avatar
    5 years ago

    These are scripts, not application code.  While classes are useful in organizing the objects and such, in order for TestComplete to execute them, they need to be made available as a method or function external to the class.  This can be done with a simple wrapper like


    function runMyMethod(){
        var myObject = new myClass();