项目需要在FireFox上进行测试,用的FireFox版本是2.0,QTP版本是9.5。
在IE上能抓取很多的对象,但是在FireFox上抓取的对象Class都是WinObject,Name都是MozillaWindowClass,请问这是为什么?
不涉及到项目的编程语言,只是针对IE和FireFox。
安装了一个Web Add-in Extensibility SDK 9.5。但是还是在FireFox上显示不出来,是否还需要安装其他的Add-in呢?
QTP9.5支持的Web Browsers有:
# Microsoft Internet Explorer 6.0 Service Pack 1, 7.0
# Netscape Browser 8.1.3, 9.0
# Mozilla Firefox 1.5, 2.0.x, 3.0 Alpha 7
用的Firefox 2.0.0.12应该是支持的,为什么会出现这样的情况??
答:
那为什么还会出现不识别的情况,问题如下:
1、QTP->Automation->Record and Run Settings-Web里,我选的是Open the following address when a record or run session begins,然后再第一个下拉框里填写自己所需要测的网址,这样,在你录制的时候会直接打开一个你所需要录制的web网页。在第二个下拉框里选择 Firefox 2.0(因为我要测的就是2.0,所以选的就是这个,根据自己实际的项目需要)
2、根据Help文档:Mozilla Firefox uses the Java 2, Java 5, or Java 6 Virtual Machine as an external plug-in。你需要安装一个Java Virtual Machine,我的版本是jdk1.5.0_11。
3、还是根据Help
If your applet runs in Mozilla Firefox:
In Mozilla Firefox, select Tools > Java Console.
If you do not see the Java Console option in the Tools menu, install the Open Java Console extension from https://addons.mozilla.org/firefox/141/. This extension provides the menu option on the Tools menu for opening the Java Console from Mozilla Firefox. It also provides a toolbar button in the JavaScript Console for opening Java Console.
根据链接,去下一个Java Console。我下的是open_java_console-1.6-fx。然后安装上,在你的FireFox->Tool下会有一个Java Console的选项。
这时候我的QTP就可以全部识别FireFox里的所有控件了。
如果还有什么问题的话,还可以尝试安装两个Add-in.
QuickTest Professional Web Add-in Extensibility SDK
QuickTest Professional Java Add-in Extensibility SDK
因为我是先安装的Add-in,安装后还是不能识别,所以我也不清楚有没有用,大家可以作为参考。