Micro Focus QTP (UFT) Forums
"Verify that parent properties match..." - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: "Verify that parent properties match..." (/Thread-Verify-that-parent-properties-match)



"Verify that parent properties match..." - stevol - 05-09-2008

I have registered the login in a website. While registering, I clicked "Yes" in 2 protection advice boxes.
When I run the test, I obtain Run Error:
Cannot find the "Sì" object's parent "Avviso di protezione" (class Dialog). Verify that parent properties match an object currently displayed in you application.

In the Expert View, I see (xyz is an organization):
..
Code:
Browser("xyz").Dialog("Avviso di protezione").WinButton("Sì").Click
Browser("xyz").Dialog("Avviso di protezione").WinButton("Sì").Click
..
in which the error is in the second line. How can I resolve the problem? (and which is the meaning of the error?).
thx :-)


RE: "Verify that parent properties match..." - Ankur - 05-09-2008

Is that a pop-up where you are getting an error? If yes, refer this post

otherwise check if there are any dynamically changing values for the erroneous object..


RE: "Verify that parent properties match..." - Anshoo Arora - 05-10-2008

Try this:

Code:
Browser("micclass:=Browser").Dialog("micclass:=Dialog").WinButton("si").Click

There might be a few reasons why this has happened. You must check if you executed your code for the right dialog box, and if yes, then chances are that its a dynamic object. You should look into Regular Expressions to handle such behavior, or revert to DP.


RE: "Verify that parent properties match..." - Ankur - 05-11-2008

@ Anshoo

Code:
Browser("micclass:=Browser").Dialog("micclass:=Dialog").WinButton("si").Click

The code above will never work. Remember the simple rule:

Parent OR -- Child DP: Code Works
Parent DP --- Child OR : Code would never work


RE: "Verify that parent properties match..." - Anshoo Arora - 05-11-2008

You are absolutely right, my bad. I copied the last portion out without paying much attention, but it should be like this:

Code:
Browser("micclass:=Browser").Dialog("micclass:=Dialog").WinButton("regexpwndtitle:=si").Click

Stevol, when you click the WinButton at first, does another dialog box appear? Can you try to introduce a a few seconds wait before executing the next click if that is the case?


RE: "Verify that parent properties match..." - stevol - 05-12-2008

I proved various tips [add of 'visible' property about Dialog & WinButton, the different string with "regexpwndtitle:=si", ...], without results.
Then i proved to repeat always the same test, but waiting for some second before press the "si" button... i have not understood why, but now it has correctly worked... :-O
thx :-)


RE: "Verify that parent properties match..." - stevol - 05-12-2008

The solution proposed before doesn't function always... different runs of the same test produce different effects... sometimes the run finishes correctly, others i obtain the usual error posted... i suppose it may depend by eventual transitory net problems (we have traffic problem on the net... too simultaneous connections...)