Won't Fix
Last Updated: 20 Mar 2019 14:28 by ADMIN
Boyan Boev
Created on: 24 Mar 2016 12:15
Type: Feature Request
Ability to attach the recorder to a WPF application after restarting it with a coded step
When I restart the WPF application with the following code:

var runningApp = System.Diagnostics.Process.GetProcesses().Where(p => p.ProcessName == "WPFCalculator2");

the recorded is not able to attach again with RunToHere option and TS throws the following exception:

 Outer Exception Type: System.ArgumentException
     Message: Process with an Id of 13348 is not running.
     HRESULT: 0x80070057 (Official ID (if app.) = E_INVALIDARG, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_INVALID_PARAMETER)
     Call Stack:
          at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
          at System.Diagnostics.Process.GetProcessById(Int32 processId)
          at Telerik.TestStudio.Wpf.WpfRecorderWindowManager.AttachRecorderToApplication(Int32 pid, Action`2 callback)
          at ArtOfTest.WebAii.Design.DesignTimeExecution._runner_TestCompleted(Object sender, TestCompletedEventArgs e)
          at ArtOfTest.WebAii.Design.Execution.RunnerController.OnTestCompleted(ExecutionReturnValues result)
          at ArtOfTest.WebAii.Design.Execution.RunnerController.CallBackListener()

If we just execute the test it works smoothly and executes all the steps after the restarting.