Forum Discussion

scsvel's avatar
scsvel
Frequent Contributor
14 years ago

Regarding FindChild method

Hi all,

I am using FindChild method very often in my automation scripts. I have some clarifications..

If I wanted to pass single property then OK...

Sys.FindChild("PropName", "PropValue", depth_of _child);

If I wanted to pass multiple properties then I need to go for arrays and I am using JavaScript...

Names = new Array("Visible", "Enabled");

Values = new Array(true, true);

Sys.FindChild(Names, Values, depth_of _child);
 ----> Not work as mentioned in TC HelpFile

But here I need to convert these Array Values to Dictionary Object and have to pass.. Why I have to convert to other format and any other options are there to accomplish this in an easy way?



Thanks.
  • Hi,



    Why I have to convert to other format


    You should do this because FindChild works with OLE-compatible arrays, and JScript arrays are not OLE-compatible.



    BTW, Find methods in TC 8 are able to work with JScript arrays.