08-05-2011, 09:02 PM
If this matches more than one object, I can see how that would return a general run error. QTP is not very helpful with errors related to the use of descriptive programming. Try doing this instead:
set a breakpoint on the line of code after "set children=..." and examine "children.count". My guess is that children.count here is either 0 or > 1. Try that and see if that shows you anything useful.
I'm guessing your code didn't find your frame at all, or it found several matches.
Code:
Set frameObjectDesc = Description.Create
frameObjectDesc("micclass").value = "Frame"
frameObjectDesc("name").value = "header"
set children=Browser(browserObjectDesc).Page(pageObjectDesc).ChildObjects(frameObjectDesc)
if children.count = 1 then
<do whatever you would normally do here>
else
Reporter.ReportEvent micFail, ... (or whatever you want to do here)
end if
I'm guessing your code didn't find your frame at all, or it found several matches.