Forum Discussion

Kanwar's avatar
Occasional Contributor
4 years ago

How to open any file from desktop in keyword test

Hi, I want to open a PDF file from desktop using keyword test operation. For this which operation can I use? I tried aqFile.OpenTextFile and it ran without an error but file didn't open.

TanyaYatskovska Marsha_R 




  • Can you get a text version of the document and save it in the same place as the pdf?  That way you can still make sure that the storage area is accessible to TC and you can compare a text file rather than a pdf.  It's not exactly the same test, but I'm guessing that you are more interested in the content of the document rather than the fact that it's stored as a pdf.

9 Replies

    • Kanwar's avatar
      Occasional Contributor

      Marsha_R  Thanks for your response. Unfortunately, my testcomplete version 14.20 does not have Intelligence Quality add-on enabled and that's stopping me to validate PDF files. Do we have any other alternatives or we must need to enable this add-on which will cost us extra bucks?



      • bach_ls's avatar
        Occasional Contributor

        If i'm not mistaken the only method available to you is importing external java library, but a) its usage is restricted to scripts and b) it's a bit complicated. You can find great tutorial online: But beware: library referred in this tutorial treats pdfs as txt files, so it is easy to work with text, but no so much when more complicated stuff is involved (fonts, pictures, page layout).

        I don't believe you can achieve something like that in keyword tests without paying for add-on.