Unable to load specific add-ins while starting UFT through Active-X object using javascript code

Hi There,

I'm unable to load specific add-ins while starting UFT through Active-X object using javascript code.
Can anyone help me with sample code.

Thanks in advance.

Parents
  • I suppose you are trying to use UFT automation object model to load specific addins.

    Sample code using vbscript will be something like:

    Dim qtApp 'As QuickTest.Application ' Declare the application object variable
    Set qtApp = CreateObject("QuickTest.Application") ' Create the application object
    
    ret = qtApp.SetActiveAddins(Array("Web","ActiveX"), errDesc) 'Load the Web and ActiveX Add-ins
    
    qtApp.Launch ' Start UFT
    qtApp.New ' Open a new test

     Hope it helps.

    Feel free to show us the code you are running for further assistance

  • Hello StickyFingaz:

    Find the following for my javascript function wher I'm trying to start UFT with selected add-ins

    function startUftApplication() {
       uftObj = new ActiveXObject("QuickTest.Application");

      // Here I need to load add-ins, but it is not working as expected //even I tried with code conversion to       javascript

      //  ret = uftObj.SetActiveAddins(Array("Web","ActiveX"), errDesc);  //'Load the Web and ActiveX Add-ins

       uftObj.Launch();
       uftObj.Visible = false;

       uftObj.Options.Run.ImageCaptureForTestResults = "OnError";

       uftObj.Options.Run.RunMode = "Fast";
       uftObj.Options.Run.ViewResults = false;
       return true;
    }

    Please let me know what change is required to make it work.

     

Reply
  • Hello StickyFingaz:

    Find the following for my javascript function wher I'm trying to start UFT with selected add-ins

    function startUftApplication() {
       uftObj = new ActiveXObject("QuickTest.Application");

      // Here I need to load add-ins, but it is not working as expected //even I tried with code conversion to       javascript

      //  ret = uftObj.SetActiveAddins(Array("Web","ActiveX"), errDesc);  //'Load the Web and ActiveX Add-ins

       uftObj.Launch();
       uftObj.Visible = false;

       uftObj.Options.Run.ImageCaptureForTestResults = "OnError";

       uftObj.Options.Run.RunMode = "Fast";
       uftObj.Options.Run.ViewResults = false;
       return true;
    }

    Please let me know what change is required to make it work.

     

Children