使用Chrome使用Java脚本打开QTP(UFT) [英] Open QTP (UFT) Using Java Script using Chrome

查看:215
本文介绍了使用Chrome使用Java脚本打开QTP(UFT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我用来启动qtp的代码,它与IE兼容,但不适用于chrome. 我通过Chrome打开后将进行哪些更改

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;

推荐答案

Microsoft的VBScript与COM集成,并且UFT还公开了COM接口,这就是为什么您能够使用VBScript从HTML启动UFT的原因.但是,Chrome不支持VBScript,并且JavaScript未与COM集成(至少不是Chrome的JavaScript).

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).

因此,我认为没有一种简单的方法可以使用Chrome从HTML页面启动UFT.如果您编写了Chrome扩展程序,则可能会出现问题,但我认为这不值得.

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.

这篇关于使用Chrome使用Java脚本打开QTP(UFT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆