开发者

Get the Type of an object's children in silktest

开发者 https://www.devze.com 2023-03-29 22:45 出处:网络
Assume i have an object and it has lots of children.May i know how i can find their types? I first used getChildren() to get the children and then used typeof() for each child.

Assume i have an object and it has lots of children.May i know how i can find their types?

I first used getChildren() to get the children and then used typeof() for each child.

Typeof always returns Window.

I would l开发者_如何学JAVAike to find if they are DomTextField or DomLink etc and not Window.

Thanks


The easiest way is to use yourParent.FindAll(/DomTextField), this will give you all direct children, if you want to include all descendants, use yourParent.FindAll(//DomTextField).

0

精彩评论

暂无评论...
验证码 换一张
取 消