cannot find object's parent Class: Please Help. New to UFT (Pl. don't ignore)
I am navigating from Page A by clicking on L1 link to Page B. Now from Page B, I need to click on link L2 to navigate to Page C
I have recorded session from page A through Page C
1. Was successfully able to navigate from Page A to Page B
2. On Page B, the object is Link L2>Parent Class: Frame (Name: FolderFrame)>Parent Class: Page ("Name of the page")>Parent class: Browser ("Name of the browser"). The tool need to click on that this link.
While on Page B, qtp is executing following statement: Browser("IE").Page("Nebraska Department of").Frame("folderFrame").Link("REPAYMENT OF BENEFIT OVERPAYME").Click, it throws below error
"Cannot find the "REPAYMENT OF BENEFIT OVERPAYME" object's parent "folderFrame" (Class Frame). Verify that parent properties match an object currently displayed in your application.
I tried to insert Wait statement for 10 second before Page B>Link L2 statement. I also tried inserting wait property for Page A>Link L1 statement.
Sometimes it goes through and it hits Page C. But most of the time, it throws a run time error on page B itself as I copied above.
Please help. Please elaborate your answers. I would appreciate if you tell me justify your suggestion. That way I will learn.
It sounds like you've got a dynamic property in the definition of the frame and it is sometimes matching, sometimes not. Check the Object Repository entry for that frame, to see if there are any properties that are changing each time you visit the page. If so, you may need to change the properties used to identify the frame, or make the values of the properties that are currently used into regular expressions that will match the page values as they change.
I might could help in more detail if you posted the object description. To do that, you can use the GUI spy to select the object, copy the object description, and then paste it here.
Thank you for your suggestion. For some reason, when I add Wait property again, it has been working constantly so far. However, I have noted down your suggestion and will definitely provide you more detail.
I find that I can understand why there is an issue recognizing and object when I use descriptive programming. I start on the left side Browser(name:=MyWindow"). I use the highlight method to see that I can make the browser blink. Then I keep on adding more object levels moving to the right. It is easier to find the trouble spot this way. I find it difficult to keep changing the Object Repository. I can see it all at once in the code. IHTH.