This is a migrated thread and some comments may be shown as answers.

Select and upload file using Tosca Testsuite

7 Answers 699 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hariprasad
Top achievements
Rank 1
hariprasad asked on 25 Jan 2018, 02:13 PM

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

Sort by
0
Accepted
Elena
Telerik team
answered on 29 Jan 2018, 08:23 AM
Hello Hariprasad,

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
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Serhii
Top achievements
Rank 1
answered on 15 Sep 2020, 07:46 AM

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. 

 

0
Elena
Telerik team
answered on 16 Sep 2020, 04:30 PM

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).

0
Serhii
Top achievements
Rank 1
answered on 17 Sep 2020, 01:44 PM

Hi Elena, 

Thanks a lot for Help and quick answer. It works !!!

Best Regards,

Serhii

0
Elena
Telerik team
answered on 17 Sep 2020, 03:34 PM

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/.

0
Serhii
Top achievements
Rank 1
answered on 18 Sep 2020, 03:02 PM

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);

0
Elena
Telerik team
answered on 21 Sep 2020, 01:09 PM

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).

Tags
General Discussions
Asked by
hariprasad
Top achievements
Rank 1
Answers by
Elena
Telerik team
Serhii
Top achievements
Rank 1
Share this question
or