I apologize, I'm sure this has been asked and I promise you I spent the better part of the morning searching for an answer.
I'm using a combination of Test Studio standalone and Visual Studio for the code behind.
Scenario:
Have a series of Web Test's (recorded steps and scripted steps (Utility Class)) that go out and collect baselines based off tables on a website and export them to CSV files in the Data directory of the project.
Have another series of Web Test's that are simply scripted steps that compare the baseline to another generated file.
I've written a small WPF application that enumerates the directory containing the CSV files and simply asks the user which one they would like to compare to the baseline with.
I am able to open the WPF application using the Manager.LaunchNewApplication along with a bunch of other settings. I can make assertions based on the contents of the WPF app, however the manager does not wait for the application to close and test continues through steps.
Is there a way that I am missing that would allow the Manager to wait for the WPF application to close? I am sure it is simple (I am newer to programming versus system admin scripting), I am just missing it. Using the latest public build of Test Studio.
Below is a super stripped down version of what I am trying to accomplish.
I have looked at http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/wpf/connect-to-running-wpf-app.aspx along with searching the forums.
I'm using a combination of Test Studio standalone and Visual Studio for the code behind.
Scenario:
Have a series of Web Test's (recorded steps and scripted steps (Utility Class)) that go out and collect baselines based off tables on a website and export them to CSV files in the Data directory of the project.
Have another series of Web Test's that are simply scripted steps that compare the baseline to another generated file.
I've written a small WPF application that enumerates the directory containing the CSV files and simply asks the user which one they would like to compare to the baseline with.
I am able to open the WPF application using the Manager.LaunchNewApplication along with a bunch of other settings. I can make assertions based on the contents of the WPF app, however the manager does not wait for the application to close and test continues through steps.
Is there a way that I am missing that would allow the Manager to wait for the WPF application to close? I am sure it is simple (I am newer to programming versus system admin scripting), I am just missing it. Using the latest public build of Test Studio.
Below is a super stripped down version of what I am trying to accomplish.
public
static
class
PCCSR
{
public
static
string
root = ExecutionContext.Current.DeploymentDirectory + @
"\Data\"
;
public
static
void
NSRtestWPF()
{
Manager.Current.LaunchNewApplication(root + @
"PCCNSR.exe"
,
"Admin"
);
ListBox b = Manager.Current.ActiveApplication.MainWindow.Find.ByName<ListBox>(
"lstbxFiles"
);
Assert.IsTrue(b.Items.Contains(
"Baseline_Security_Roles_Admin.csv"
),
"File not found"
);
}
}
I have looked at http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/wpf/connect-to-running-wpf-app.aspx along with searching the forums.