Forum Discussion

MonicaTeotia's avatar
MonicaTeotia
Occasional Contributor
12 months ago

How to verify if a PDF file is opened successfully

Test Case

Navigate to the application

Click on the PDF button

Verify if the pdf is rendered successfully.

 

How can we verify if the pdf is successfully opened and user is able to view it?

 

Thanks & Regards,

Monica

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    How would you perform this manually?

     

    For example, you would open the pdf document in Chrome. You would then verify the contents of the document. The same can be applied using TestComplete, but you will need to perform some sort of image comparison - if it passes, you can assume that the document is opened, and the contents is correct. 

  • MonicaTeotia's avatar
    MonicaTeotia
    Occasional Contributor

    Hi rraghvani 

    It will not be the case that everytime user opens the same pdf so that we can do image comparison.

    Different pdfs will be opened up depending upon the availibility.

    Manually how we do is Just open it and verify yes there is no error thrown and we can see that pdf has opened up

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    For example, I've opened a file in Notepad++ and task manager shows what file I have opened

    This could be a way of checking if the file has been opened