Forum Discussion
4 Replies
- kumar_perlaaContributorHere is the recommandation solution for your problem/issue.
use FindChild() method, that find out child window depth > 1
below is the code snippet:
function ABC()
{
-----;
----;
var TestObj = xyz.WinFormsObject("abc");
var ChildObj = TestObj.FindChild(Array("ObjectType","ObjectIdentifier"),Array("CheckBox","CheckBOX_ID2"),1) ;
-----;
---;
}
OR
FindChild(Array("ObjectType","CheckBox"),1) ;
Hi Alex,
The FindId method looks for the window based on the object ID. As you are searching for the window, you'd better use the FindChild method as Kumar suggested. BTW, by default, the method finds only children. If your object is located deeper in the object tree, you may specify Depth for search.
- at1_olsbNew Contributor
Thank you for quick response!
I used FindChild method ... but sometimes i didn't know what depth should be for particular window. So i thought that FindID will help me. Also if i have a huge object tree FindChild method works too slow if depth>8 for example...
But anyway thanks
Hi Alex,
The test execution is expected to get slower when you set a big depth. The method is iterating through all the children of the object from which you call it in the object tree.