Identifying content displayed inside QTP -
i trying identify content displayed inside frame using qtp. asking page frames match description , collection of frames. take first frame collection reason seems object doesn't exist, , therefore can't reach content displayed inside. idea how can extract content inside frame, , why doesn't qtp recognize an existing object? (remark: intentionally didn't use repository identify frame cause frame has unique location in page dynamic indexes identify 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 number >0 set firstframe=framescollection(0) firstframe.exist-> returns false
you can't use exist
on object returned childobjects
full explanation on why see blog post.
you should use object without checking whether exists. if want prove object found correctly can use undocumented highlight
method.
Comments
Post a Comment