问题
The following is the code I used to launch qtp, It is working well with IE but not in chrome. What are the changes I shd Make to open through Chrome
var qtApp = new ActiveXObject("QuickTest.Application");
qtApp.Launch(); // Start QuickTest
qtApp.Visible = true;
回答1:
Microsoft's VBScript is integrated with COM and UFT also exposes a COM interface, this is why you were able to launch UFT from HTML using VBScript. However VBScript is not supported by Chrome and JavaScript is not integrated with COM (at least not Chrome's JavaScript).
Therefore I don't think there's a simple way to launch UFT from an HTML page using Chrome. It is possible if you write a Chrome Extension but I don't think this is worth the trouble.
回答2:
One way to do it will be to create an ASP.Net website, ASP.net will support opening UFT using the COM interfaces. I am doing the same thing for ALM's OTA API.
来源:https://stackoverflow.com/questions/49230113/open-qtp-uft-using-java-script-using-chrome