I am using test recorder on cPOS. The test script runs fine for few times, but, after few runs it keeps failing with the following error, even when no change is made to the recording xml file or the variable xls file.
Status: Test case failed.
ERROR:
<?xml version=/1.0/ encoding=/utf-16/?>
<Error xmlns:xsi=/http://www.w3.org/2001/XMLSchema-instance/ xmlns:xsd=/http://www.w3.org/2001/XMLSchema/>
<ExceptionType>System.Reflection.TargetInvocationException</ExceptionType>
<Message>Exception has been thrown by the target of an invocation.</Message>
<StackTrace> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Microsoft.Dynamics.Commerce.UIAutomation.POS.PosApplication.PageFactory.CreatePage[T](TimeSpan waitForViewTimeout) at Microsoft.Dynamics.Commerce.UIAutomation.POS.Pages.DeviceActivationPage.ActivateDevice(DeviceActivationRequest deviceActivationRequest) at Microsoft.Dynamics.Commerce.Client.Platform.PosPlayback.RecordingPlayback.TestPlayback.ExecuteDeviceActivationProcessScript() at Microsoft.Dynamics.Commerce.Client.Platform.PosPlayback.RecordingPlayback.TestPlayback.TestSetup() at Microsoft.Dynamics.Commerce.Client.Platform.PosPlayback.RecordingPlayback.TestPlayback.ReproduceEvents(IList`1 eventsList, RecordingVersion recordingVersion, String timeXmlFilePath) at Microsoft.Dynamics.Commerce.PosPlayback.RecordingsRunner.TestPlaybackManager.PlaybackEvents(Int32 testCaseId) at Microsoft.Dynamics.Commerce.PosPlayback.RecordingsRunner.Application.Start() at Microsoft.Dynamics.Commerce.PosPlayback.RecordingsRunner.Program.ExecuteCommands(PlaybackCommandArgs args, ILogger logger)</StackTrace>
<InnerError>
<ExceptionType>OpenQA.Selenium.WebDriverTimeoutException</ExceptionType>
<Message>Timed out after 120 seconds</Message>
<StackTrace> at OpenQA.Selenium.Support.UI.DefaultWait`1.ThrowTimeoutException(String exceptionMessage, Exception lastException) at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition) at Microsoft.Dynamics.Commerce.UIAutomation.Core.Browser.WaitUntil[TResult](Func`2 webDriverAction, TimeSpan timeout) at Microsoft.Dynamics.Commerce.UIAutomation.POS.Pages.PageBase.WaitUntilViewIsActive(IApplicationDriver driver, String viewName, TimeSpan timeout) at Microsoft.Dynamics.Commerce.UIAutomation.POS.Pages.LogOnPage..ctor(IPageDependencies dependencyContainer, TimeSpan timeout)</StackTrace>
<PlaybackVersion>9.39.0.0</PlaybackVersion>
</InnerError>
<PlaybackVersion>9.39.0.0</PlaybackVersion>
</Error>