Hello Everybody
I am testing a WPF App. My App is started from a ClickOnce shortcut. Here are the steps:
1 - Start Test Studio and create a WPF test
2 - Add a Code Step in my WPF test
3 - Using the snippets in http://docs.telerik.com/teststudio/user-guide/code-samples/wpf/connect-to-running-wpf-app.aspx to connet to my running WPF App:
All these steps work fine but how can i record my steps in Test Studio Standalone after the code step.
Thanks
Hicham
I am testing a WPF App. My App is started from a ClickOnce shortcut. Here are the steps:
1 - Start Test Studio and create a WPF test
2 - Add a Code Step in my WPF test
3 - Using the snippets in http://docs.telerik.com/teststudio/user-guide/code-samples/wpf/connect-to-running-wpf-app.aspx to connet to my running WPF App:
// close the mock app
ActiveApplication.Quit();
string
appPath =
string
.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Programs), @
"\MyWPFApp\DEVELOPMENT\MyWPFApp.appref-ms"
);
System.Diagnostics.Process.Start(appPath);
var runningApp = System.Diagnostics.Process.GetProcesses().Where(p => p.ProcessName ==
"MyAPP"
);
while
(runningApp.Count() == 0)
{
runningApp = System.Diagnostics.Process.GetProcesses().Where(p => p.ProcessName ==
"MyAPP"
);
}
Manager.ConnectToApplication(runningApp.FirstOrDefault());
while
(!Manager.ActiveApplication.Process.WaitForInputIdle())
Manager.ActiveApplication.MainWindow.RefreshVisualTrees();
ActiveApplication.WaitForWindow(
"My App"
);
All these steps work fine but how can i record my steps in Test Studio Standalone after the code step.
Thanks
Hicham