Code: Select all
System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at System.Collections.Generic.List`1.Enumerator.MoveNext() at Ranorex.Core.ElementEngine.ApplyGlueRules(Element element, GlueRuleExecutionState state) at Ranorex.Core.ElementEngine.ApplyGlueRules(Element element) at Ranorex.Core.Element.GetChildren(CacheSession session) at Ranorex.Core.Element.get_Children() at Ranorex.Core.RxPath.collectAxis(LocationStep step, Axis optimizedAxis, Element self, IList`1 elements, Boolean quitOnFirstGoodNode) at Ranorex.Core.RxPath.ApplyInternal(RxPath path, Element startElement, IDataProvider dataProvider, Duration timeout, Boolean findSingle) at Ranorex.Core.Element.FindSingle(RxPath path, Duration timeout) at Ranorex.Adapter.FindSingle(RxPath path, Duration timeout) at RanorexFramework.RFW.WaitForWindowPartialName(String WindowName, Int32 Timeout) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\RanorexFramework\RanorexFramework\Class1.cs:line 949 at Estimating_Regression_Test_1.Program.HardDollarEstimatingRegressionTest1() in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\Estimating Regression Test 1\Estimating Regression Test 1\Program.cs:line 161 at Estimating_Regression_Test_1.Program.Main(String[] args) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\Estimating Regression Test 1\Estimating Regression Test 1\Program.cs:line 106
Code: Select all
HDForm = Host.Local.FindSingle("/form[@title~'" + WindowName + ".*']", Timeout * 1000);
Also, If I call this method from another test script it works fine.
I have just createad another test script and this is one of the very first calls. For whatever reason it is failing in the new test script but not the existing test script.
Any ideas?