Verify the check state of the checkbox.

Namespace:  QAliber.Engine.Controls.UIA
Assembly:  QAliber.Engine (in QAliber.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public ToggleState CheckState { get; }
Visual Basic (Declaration)
Public ReadOnly Property CheckState As ToggleState
Visual C++
public:
virtual property ToggleState CheckState {
	ToggleState get () sealed;
}

Remarks

Note the check state is retrieved by using the windows UI Automation

Examples

This code will check / uncheck Inv button in calc, based on the check state
CopyC#
 System.Diagnostics.Process.Start("calc");
 UIAWindow calcWin = Desktop.UIA[@"Calculator", @"SciCalc", @"UIAWindow"] as UIAWindow;
 UIACheckBox invCB = calcWin[@"Inv", @"Button", @"140"] as UIACheckBox;
 if (invCB.CheckState == System.Windows.Automation.ToggleState.Off)
 {
     invCB.Check();
     MessageBox.Show("Button is checked, now unchek it");
 }
 if (invCB.CheckState == System.Windows.Automation.ToggleState.On)
 {
     invCB.UnCheck();
}

See Also