We will implement overloaded methods to find controls in a form with ControlId and ClassName in the next Version 0.9.3.
In the actual RanorexNet Version (or in older ones) you can do the following:
1. Get the ControlId with RanorexSpy
2. Find the control with form.FindControlId()
3. Check the control type and cast to the desired type
For example, you can check the Hex radio buttom of the calc application (see first sample) as follows:
Code: Select all
Control control = form.FindControlId(306);
if (control is RadioButton)
{
RadioButton hexRadio = (RadioButton)control;
Mouse.MoveToControl(hexRadio);
hexRadio.Checked = true;
}
Ranorex Team