Identification of content displayed inside QTP

I am trying to identify the content displayed inside a frame using QTP. I ask the page for all frames that match the description and get a collection of frames. I take the first frame from the collection, but for some reason it seems that Object does not exist, and therefore I can not get to the content displayed inside. Any idea how I can extract the contents inside the frame and why QTP does not recognize it as an existing object? (Note: I intentionally did not use the repository to identify the frame, because the frame has a unique location on the page with dynamic indexes to determine its location)

Thanks Nathan

Code Description:

set TargetPage= Browser(...).Page(...)

Set objDesc = Description.Create()
objDesc("micclass").Value = "Frame"
objDesc("html id").Value = "id"
objDesc("html tag").value = "IFRAME"
objDesc("name").value = "id"

set FramesCollection = TargetPage.ChildObjects(objDesc)

Print FramesCollection .count-> Prints a number >0

set firstFrame=FramesCollection(0)
firstFrame.Exist-> Returns False
+3
source share
1

Exist , ChildObjects, , ,

, , . , , Highlight.

+3

Source: https://habr.com/ru/post/1774921/


All Articles