Declaring a childname for waitChild method
I'm trying to use waitchild method for a .NET application and I can not get it work right. Everytime I run the test it returns false.
I'm attaching the code snippet.
In the code i'm trying to use waitChild methods for lblField,lblValue and txtValueEdit objects. For that i have declared variables child1,child2 and child3.
For lblField and lblValue it returns object does not exists.
For txtValueEdit, TestLog brings up an error message saying "unable to find object"
Any idea on how to declare child name?
Can anyone tell me what am I doing wrong?
Re: Declaring a childname for waitChild method
WaitChild is an incorrect method in this case. You need to use WaitWinFormsObject (see the "Process.WaitWinFormsObject" help topic) like this:
<font class="small">Code:</font><hr /><pre>...
var Child1 = w8["WaitWinFormsObject"]("lblField", 1000);
if(Child1["Exists"]) // Do some actions