简体   繁体   English

QTP无法识别帧对象

[英]QTP is not identifying frame object

I am using QTP 9.5. 我正在使用QTP 9.5。 It is not able to identify frame object.I used object spy, when hand goes on frame it recognize as windows explorer, not frame.. Please suggest solution for this. 它无法识别框架对象。我使用了对象间谍,当手放在框架上时,它会识别为Windows资源管理器,而不是框架。。请为此提出解决方案。

There is a known issue in QTP9.5 and 10.0 in which all web support is lost when there is a navigation to a JavaScript url (eg a link with href="javascript:..." ). QTP9.5和10.0中存在一个已知问题,当导航到JavaScript URL(例如,带有href="javascript:..."的链接)时,所有网络支持都将丢失。

Hotfix QTPWEB_00029 solves this issue (for QTP9.5) you can get this hotfix by contacting HP support. 修补程序QTPWEB_00029解决了此问题(对于QTP9.5),可以通过与HP支持联系来获取此修补程序。

Another thing that may work is to run the undocumented method Browser("...").RefreshWebSupport 可能可行的另一件事是运行未记录的方法Browser("...").RefreshWebSupport

My experience tells me that QTP 9.5 is unstable and has lot of open issues. 我的经验告诉我,QTP 9.5不稳定并且有很多未解决的问题。 I won't be surprised if this happens to be an arbitrary behavior. 如果这是任意行为,我不会感到惊讶。

Call childobjects() on the page object and check whether the required frame is part of the returned collection. 在页面对象上调用childobjects()并检查所需的框架是否属于返回的集合。 If not, you can also try accessing the properties of the frame using DOM. 如果没有,您也可以尝试使用DOM访问框架的属性。

Try this 尝试这个

'get the html DOM obj from the page 
Set pageObj = Browser("eNSQ Window Objects").Page("Additional Information - Type DP - Bad Habits - eNSQ").Object

'get all frames
Set frames = pageObj.getElementsByTagName("frame")

'loop through all frames and msgbox the title
for each thisFrame in frames
   MsgBox thisFrame.title
next

Do you open the window/Browser after you opened QTP? 打开QTP后是否打开窗口/浏览器?

If that did not work try re-registering QTP dlls by going to the Start Menu --> Programs --> Quicktest Professional --> Tools --> Additional Installation Requirements Run that utillity to fix the dlls. 如果这样不起作用,请尝试通过转到“开始”菜单->程序-> Quicktest Professional->工具->其他安装要求来重新注册QTP dll。运行该实用程序来修复dll。

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM