Hi,
It is possible to automate a test which selects a file from your computer and upload it online? I tried to scan the windows of my computer which show when you click the upload button online but it seems it is not possible.
Thank You
kosmiktechnologies.com
7 Answers, 1 is accepted
Thank you for posting in Test Studio forum.
Test Studio automatically detects dialogs and handles these - here you could find further details on the feature.
Regards,
Elena Tsvetkova
Progress Telerik
Hi, Elena
Could you please tell or explain how to use FileUploadDialog in code for - WPF Desktop application? I can't find a hint of how to use it with WPF Desktop applications, only for Web Browsers instructions are presented.
Hello Serhii,
I am sorry to hear you are facing any troubles with the dialogs for WPF application when working in code. I reviewed our documentation and noticed that we have missed to include such an article, so I will take care to update this as soon as possible.
Apart from this, I have to mention that the WPF dialog handlers are different than these you found for web apps. These are named SaveFile dialog and OpenFile dialog and here is a sample for the code to implement:
//add OpenFile dialog
ArtOfTest.WebAii.Win32.Dialogs.OpenFileDialog.CreateOpenFileDialog wpfOpenDialog = ArtOfTest.WebAii.Win32.Dialogs.OpenFileDialog.CreateOpenFileDialog(ActiveApplication, DialogButton.OPEN, @"d:\name");
Manager.DialogMonitor.AddDialog(wpfOpenDialog);
Manager.DialogMonitor.Start();
//trigger action to show dialog
// your code here
//hande SaveAs dialog
wpfOpenDialog.WaitUntilHandled(15000);
Manager.DialogMonitor.RemoveDialog(wpfOpenDialog);
Please, give it a try and let me know if you need any further assistance on the topic. Thank you for your cooperation in advance.
Regards,
Elena
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).
Hi Elena,
Thanks a lot for Help and quick answer. It works !!!
Best Regards,
Serhii
Hello Serhil,
I am pleased to know that this suggestion resolved your doubts.
Regards,
Elena
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Elena!
One note for code which you sent me above.
Works for me with small changes, need to add to Manager.Current and then DialogMonitor
Example:
Manager.Current.DialogMonitor.AddDialog(wpfOpenDialog);
Manager.Current.DialogMonitor.Start();
Manager.Current.DialogMonitor.RemoveDialog(wpfOpenDialog);
Hi Serhil,
Thanks for the note. These seem to be specifics for the project you work in and how this is organized. Anyways, I am glad that you managed to adjust the code as per your needs.
Regards,
Elena
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).