How to get only checkbox control using FindAllChildren
Hi,
I have a dialog on which i want to check all the checkbox. Refer attached image dialog.png.
I use below code.
function checkbox()
{
var i, buttons;
page = Aliases.SLDWORKS.dlgTBM.page32770
buttons = page.FindAllChildren("WndClass", "Button", 5);
if (buttons.length > 0)
{
for (let i = 0; i < buttons.length; i++)
{
Log.Message("FullName: " + buttons[i].FullName );
if(buttons[i].Visible)
buttons[i].ClickButton(1)
}
Log.Message("Total number of found edit buttons: " + buttons.length);
}
else
Log.Warning("No buttons found.");
}
I able to find all checkboxes prsent in dialog.
Problem is there is a option group box. Refer image Dialog.png.
This group box is also included in Buttons and Test Complete tries to check this button, giving error.
How to avoid this ?