Hi,
I have tried almost the whole weekend and unfortunately have no success: basically I only want to use the DialogMonitor to handle a simple SaveAs or Open dialog(both are Win32 dialog). I got always the System.TimeOutException after 60000 or after the time timeout specified with the WaitUntilHandled(2000), for example.
Here is the code I used:
[TestMethod]
public
void
Telerik()
{
TelerikCore.Settings mySettings =
new
TelerikCore.Settings();
TelerikCore.Manager myManager =
new
TelerikCore.Manager(mySettings);
myManager.Start();
var wpf = System.Diagnostics.Process.GetProcesses().Where(p => p.ProcessName ==
"WpfApplication1"
);
if
(wpf.Count() != 0)
{
myManager.ConnectToApplication(wpf.FirstOrDefault());
}
else
{
myManager.LaunchNewApplication(@
"D:\WpfApplication1.exe"
);
}
myManager.ActiveApplication.MainWindow.RefreshVisualTrees();
ArtOfTest.WebAii.Win32.Dialogs.SaveAsDialog save = ArtOfTest.WebAii.Win32.Dialogs.SaveAsDialog.CreateSaveAsDialog(myManager.ActiveApplication,DialogButton.SAVE, @
"C:\", "
Save As");
myManager.DialogMonitor.AddDialog(save);
myManager.DialogMonitor.Start();
var saveButton = myManager.ActiveApplication.MainWindow.Find.ByName(
"SaveButton"
);
saveButton.User.Click();
save.WaitUntilHandled();
}
Please not that the application under test is a simple WPF application with two buttons: one for a SaveAs dialog and the other for a OpenFile dialog.
Is there something wrong with the code?
By the way, I 'm using the latest version of the Telerik Testing Framework.
Great thanks for any tip in advance,
Thank you,
Bo
P.S. the WPF application is attached. Please rename it to an .exe file.
Hi,
is there a build-in handler for a ConfirmDialog of WPF? It seems that the ConfirmDialog(as well as the AlertDialog) in the namespace ArtOfTest.WebAii.Win32.Dialogs only available for a browser.
By the way, I have tried the GenericDialog, but it did not work for me.
Best regards,
Bo
Hi,
I'm searching a build-in handle for MessageBox in WPF, and it is exactly this one: http://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/add-message-box
Would it also be possible to use the DialogMonitor to handle it, or could we create a custom handler for it?
Best regards,
Bo
Hi
The HTML5 viewer is opened on a button click event. I want to validate if this viewer is opened correctly.
for Silverlight viewer i can use the blow code to validate.
SilverlightApp app = man.ActiveBrowser.SilverlightApps()[0];
app.loaded ,can be used to check. Please help me for HTML5 viewer.
Recently I have upgraded the Telerik Testing Framework to the latest freely available version - TestingFrameworkFree.2015.2.723.but now my solution is full of errors related to the FindElementException class or ArtOfTest.Common. Exceptions namespace. It does not locate the namespace. I even search the Object Explorer but not able to locate there as well.
Have you guys removed the FindElementException class or ArtOfTest.Common. Exceptions from the latest version. If yes, why? If no, how should I locate this?.
What is the difference between FindElementException and FindException?
Thanks and Regards
Vinay