I'd like to create an automated test which requires either dragging and dropping a local file, or opening Windows Explorer and choosing a local file. Can this be done in Test Studio?
1 Answer, 1 is accepted
0
Elena
Telerik team
answered on 08 Nov 2023, 04:08 PM
Hi Jim,
In the context of web testing the drag and drop action is limited to the browser area. With that said it is not a supported scenario out-of-the-box to validate if dropping an external file is dropped in the upload area. Instead, you can use the upload button to trigger the Upload dialog and handle it.
Apart from that and because you are using the latest Test Studio version I want to share another possible solution - it is available since we released the Desktop feature last year. This type of testing allows you to interact with all objects visible on the desktop and the good news is that such actions can be invoked in between the web test scenario. You can explore this article which demoes the capabilities of desktop testing. It uses a sample desktop app, but you can actually use all objects on the desktop. You need to ensure what will be visible on the screen during the test run.
I hope this will be helpful for you.
Regards,
Elena
Progress Telerik
Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Ok, I did some experimenting and got it to work. All set on this. I'll take a look at your second suggestion next.
Elena
Telerik team
commented on 10 Nov 2023, 01:04 PM
Hi Jim,
I am glad to know you managed to adjust the file upload scenario. It requires an action which brings up the upload dialog. Then the 'Handle Upload' step.
I just want to add that article you referred describes how to handle the dialog in code. This is not needed for this case as you confirmed that the test is set.