简体   繁体   中英

QTP is not identifying frame object

I am using 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.

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

Hotfix QTPWEB_00029 solves this issue (for QTP9.5) you can get this hotfix by contacting HP support.

Another thing that may work is to run the undocumented method Browser("...").RefreshWebSupport

My experience tells me that QTP 9.5 is unstable and has lot of open issues. 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. If not, you can also try accessing the properties of the frame using 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?

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.

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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