Forum Discussion
shankar_r
9 years agoCommunity Hero
Hi,
Scenario here is, You have multiple controls like textbox, combo-box and etc, in same screen.
You can use FindAllChildren method find your objects which will return the collection of object that are matched with your given properties and values.
you can try something like below,
function test()
{
var Parent = Aliases.MyMainPage;
var propArr = new Array("JavaClassName","AWTComponentAccessibleName");
var txtFields = new Array("JTextField","*");
var arrofObjects = getAllObjects(Parent,propArr,txtFields);
//You can do the rest
}
function getAllObjects(ParentObject,Props,Values)
{
if(ParentObject.Exists)
{
return ParentObject.FindAllChildren(ParentObject,Props,Values);
}
return new Array();
}