Cadet 1st Class
Cadet 1st Class
332 views

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.

0 Likes
4 Replies
Highlighted
Commander
Commander

hello there.

 

can you please be more specific on what your problem is? some screenshots and a sample of the code you are using can be of help.

 

regards,

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

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

0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

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.

 

0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

Hello Team,

Could you please help me here to load specific add-ins while launching UFT application through JAVASCRIPT code like I shared earlier.

Thanks in advance.

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.