When the radio button is searched for during a complete run of my automation (i.e. other forms are opened, manipulated, closed, etc...) I get an exception:
Code: Select all
Ranorex.ElementNotFoundException: No element found for path './/self::radiobutton[@controlname='rbOptionFile']' within 10s. at Ranorex.Core.Element.FindSingle(RxPath path, Duration timeout) at Ranorex.Adapter.FindSingle(RxPath path, Duration timeout) at H_ReportsTest.Program.RadioButtonClick(Form RanorexFormName, String RadioButtonName) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\H$ReportsTest\H$ReportsTest\Program.cs:line 1223
Another starnge thing is when I get the exception, the CPU pegs to 100% during the find. When I run the code with commenting out the steps prior and it does find the radio button the CPU stays at a nomal percentage level.
The code used to search for the radio button (from within my own method) is:
Code: Select all
RanorexFormName.EnsureVisible();
RanorexFormName.Activate();
Thread.Sleep(1000);
HDradiobutton = RanorexFormName.FindSingle(".//radiobutton[@controlname='" + RadioButtonName + "']", 10000);
Any pointers or ideas you can share with me to help figure out this issue? Or any other information you need?