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.
Select and upload file using Tosca Testsuite
3.3k views Asked by user1745986 At
2
There are 2 answers
0
On
A bit late but for anybody still wondering how to handle file uploads from the browser:
- Add a test step using
TBox Wait
standard module and set a delay of 2000 ms or so. This is the time necessary for the file system to open the file upload dialog. - Add another test step after the previous one using
TBox Save Save As
standard module and configure the parameters for this test step as described in point 3 to 5. - Set
Caption
param to the title of the file dialog window. This can depend on OS locale or program settings. - Set
FilePath
param to the your absolute file location. - Set
Button
param to the label of the button that confirms the selected file and closes the dialog. Again, this depends on the OS locale. On English Windows OS the value would beOpen
.
Hope this helps!
If I understand you correctly, you are scanning a website with upload functionality.
Just scan the upload button of the website. Most websites then show the operating system's "Open File" dialog. For automation you could simply paste the path in the "Open File" dialog and hit enter or click open.