Forum Discussion
Dmitry_Nikolaev
13 years agoStaff
Hi Suvidh,
I am guessing that you are working with a Visual C++ application. If this is the case then the control you are working with is, most probably, CCheckListBox. If my assumption is correct, you can make use of the native methods and properties of the control in order to get information on check boxes. That is, to determine whether a check box in the CCheckBoxList control is checked or not, you need to use the native method. If you need to check an item, you need to use the SetCheck method. Here is a sample script demonstrating how to use the methods. It checks the first item in a check list box if it is unchecked and unchecks if it is checked:
Sub ChangeState
Dim ListBox, Checked
Set ListBox = Sys.Process("<MY_APP>").Window(<MY_WINDOW>).Window(<MY_CHECKLISTBOX>)
Checked = ListBox.GetCheck(0)
If Checked = 0 Then
Call ListBox.SetCheck(0, 1)
Else
Call ListBox.SetCheck(0, 0)
End If
End Sub
Please note that the native members in C++ application are available for TestComplete only if the tool has access to the debug information for the application. Please ask the developers to provide you with the debug information for the application to make this solution to work. Please find more information in the Open Applications in Visual C++ help topic.
Related Content
- 11 months agoIrinaManea
- 6 months agonado
Recent Discussions
- 16 hours agoMW_Didata