10 Answers, 1 is accepted
I'm not sure how "proper" this solution is, but it works for me. See the attached image for how I do this in a coded step.
Before calling Manage.ActiveApplication.Quit(), I make sure my app is in a spot where it can be safely closed (i.e. I put myself back at my login page before quitting the application).
Aaron, thanks for your answer, I tried it, and couple more ideas, but it seems Telerik recorder does not care about other instances of application, and always wants to see the instance it has created at the test start phase.
I tried to set ActiveApplication in Manager, even via reflection, but Recorder does not care about active application. It has some process id, and it want to see only that process.
What you are suggesting - is the workaround we are forced to use, but I don't think this is a good approach in such an application like TestStudio, that should help making tests, not creating obstacles in a way.
Also, worth mentioning - wpf recorder has a quite big bug (https://feedback.telerik.com/Project/161/Feedback/Details/225866-recorder-does-not-identify-the-automationids-in-a-custom-wpf-application-when-exe) in it, which forces us to spend much time on a single test, just because of this bug. I mean we are forced to rerecord steps, because DOM representation in recorder is different between recording and executing, but using option "run to here" we can partially solve this problem.
In WPF testing by design it is meant to have only one application per test recording. As you observed if you start second process in the same test the recorder is not launched and attached to it. A workaround could be to use a test as step in the same test or to start a new test when it is necessary to launch the application again.
The problem you mentioned in your last response is under investigation from our dev team. I hope it would be processed soon.
@Aaron: Thank you for pointing out right directions on this problem.
Best Regards,
Nikolay Petrov
Progress Telerik
Thank you for this feedback. As I mentioned previously to have one recorder available per a test script scenario is set by design. If you think that this work-flow could be improved - please add a feedback on our portal that will be reviewed by our management. Thank you in advance.
Best Regards,
Nikolay Petrov
Progress Telerik