Forum Discussion
In this case, instead of "WaitChild", try using FindChildEx. (https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findchildex-method.html). This will allow you to more finely tune what object you're looking for by more properties than just the name.
- royd7 years agoRegular Contributor
Hi Robert, good to hear from you! I have learned so much from you! Thank you. :)
As per your advice, I have tried FinChildEx, here is my code:
let formPanel = page.FindChild(["ObjectType", "idStr"], ["Form", "main-content"], 15); let sinatureArea = formPanel.FindChildEx(['tagName','idStr'],['CANVAS','signature-canvas*'], 20, true, 10000); if (sinatureArea.Exists){ Log.Picture(page, "Patient PPT forms page loaded."); } else{ Log.Warning("PPT forms page did not load in 5 seconds.") }
I get an error, I even increased the time to 10 sec, no luck!
"You are trying to call the "FindChildEx" method or property of an object that does not exist."
Any idea?
Thanks.
- tristaanogre7 years agoEsteemed Contributor
Yup.. "FindChild" returned an empty object for formPanel. So, since it couldn't find formPanel, any code after that which tries to use formPanel will fail.
- royd7 years agoRegular Contributor
Any suggestion how to address that?
Just checked, formPanel is 10 level deep on that page. Do I changed it to -
let formPanel = page.FindChild(["ObjectType", "idStr"], ["Form", "main-content"], 30);
Still no go!
Thanks.
Dave
Related Content
Recent Discussions
- 48 minutes agoSvetaG