FindChild for newly created page objects
- 5 years ago
Well, you're calling "WaitPanel" from the page object. So, it's waiting for the immediate Panel(1) right off the page object. This is why it's returning immediately because I'm assuming that there is already a Panel(1) on the main page that you didn't need to wait for.
FindChild, as you're using it, doesn't have a Timeout/Wait built into it. To do that, you should use FindChildEx
This will search for the child but note that you will need to specify a depth to search. Again, as you have it set, it's only searching the immediate child of the page so that's why it's not working well.
Side note: Some of this WOULD be a bit simpler if you utilized Aliases of mapped objects. You could map the desired panel, make it a direct Alias child of the page, and then use page.WaitAliasChild("childName", 5000) to wait for the object.