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

Verifying PDF download... ?

4 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 22 Aug 2016, 08:29 PM

I have a drop down on a web page and i select an item in the list. I click the submit button and it automatically downloads the file into my /Downloads folder (Chrome). How can I verify that the PDF was downloaded successfully? I dont want to check the contents of the PDF (no DOM), all I want is to verify that a file got downloaded successfully and it didn't time out/redirect to an error page/etc... Thanks for the help!

 

- Chris

4 Answers, 1 is accepted

Sort by
0
Aaron
Top achievements
Rank 1
answered on 23 Aug 2016, 08:47 PM

https://msdn.microsoft.com/en-us/library/system.io.file.exists(v=vs.110).aspx

This could be useful, and could be used to check that the file downloaded in a coded step.

0
Boyan Boev
Telerik team
answered on 25 Aug 2016, 01:12 PM
Hello Chris,

This can be done in a coded step with method which Aaron posted. 

Let us know if that helps.

@Aaron, thank you for sharing your knowledge with your community.


Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Chris
Top achievements
Rank 1
answered on 21 Jul 2017, 08:07 PM
Thanks for the suggestion! In my situation, the file is generated on the fly rather than checking a path and seeing if the file exists. Is that still possible? Thanks in advance.
0
Elena
Telerik team
answered on 26 Jul 2017, 12:10 PM
Hello Chris,

Thanks for getting back to us. 

As far as I understand you would like to double check if a file is currently opened. If so please note that this should be accomplished with a coded solution which would be subject of general C3 programming approach and could implemented in a coded step. 

I searched the web for some advice and here is a forum post which might be useful to suit your needs along with details from MSDN about the FileStream Class and FileStream Constructor

I hope these will be helpful! Thank you for your cooperation! 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Aaron
Top achievements
Rank 1
Boyan Boev
Telerik team
Chris
Top achievements
Rank 1
Elena
Telerik team
Share this question
or