How to open any file from desktop in keyword test
There are some requirements here for working with PDF files. There are also some keyword test examples. See if this helps.
@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?
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: https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete/. 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.
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.
@Marsha_R Thanks I will follow this method for PDF comparison.
Sorry I took the discussion to other point. I was looking for Keyword operations to open PDF file from the desktop. The link you gave me in your first post doesn't give much information about that. There must be some operations available in Keyword Test to open PDF file.
You can try File verification
I did the same for PDF and it worked perfectly fine
Stored the Master PDF in the Stores > Files
and than compare the file with Baseline it will do comparing by bytes.
Code : Files.Items(FileName).Check(SavePDFPath);
There aren't always Keyword Test options for everything. That's why you can use Run Code Snippet or Run Script Routine inside a keyword test to extend the functionality.
Thank you for helping, Community! Great job here!
Hi @Kanwar ! Have you tried the recent suggestions in this thread? Do they help?
Community and Education Specialist