Verifying PDF download... ?

5 posts, 0 answers
  1. Chris
    Chris avatar
    34 posts
    Member since:
    Oct 2015

    Posted 22 Aug 2016 Link to this post

    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

  2. Aaron
    Aaron avatar
    48 posts
    Member since:
    May 2016

    Posted 23 Aug 2016 in reply to Chris Link to this post

    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.

  3. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 25 Aug 2016 Link to this post

    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!
  4. Chris
    Chris avatar
    34 posts
    Member since:
    Oct 2015

    Posted 21 Jul in reply to Boyan Boev Link to this post

    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.
  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    526 posts

    Posted 1 day and 19 hours ago Link to this post

    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!
Back to Top