Finding radio button on dynamically changing form
Posted: Wed Dec 11, 2013 4:19 pm
Hi,
we have a problem with ranorex correctly identifying radio button on the following dialog. The dialog's lower content (edit boxes and radio buttons) is dynamically displayed depending on the value selectred in the combobox.
We use the following code to access the radio buttons.
Any ideas how to solve this issue?
we have a problem with ranorex correctly identifying radio button on the following dialog. The dialog's lower content (edit boxes and radio buttons) is dynamically displayed depending on the value selectred in the combobox.
We use the following code to access the radio buttons.
Ranorex.Form TopMostForm = Host.Local.FindSingle<Ranorex.Form>("/form"); sSearchString=".//radiobutton[@class='Button' and @accessiblename~'^"+sParameter+".*']"; if (TopMostForm.TryFindSingle<Ranorex.RadioButton>(sSearchString,5000,out myRadioButton)== true) { Report.Info("Radio button for parameter '"+sParameter+"' found"); retVal=true; } else { retVal=false; Log.LogEnd(retVal); ..... } Log.LogEnd(retVal); return myRadioButton;The thing is when we open the dialog and access the radio button right away everything works fine. Then we change the value in the combo box which leads the radio buttons to appear further down the form. If we run that code again afterwars the cursor will click on the old position of the radio button and miss the current one.
Any ideas how to solve this issue?