Hi,
Can anyone please guide me with a sample script to export the test result to a PDF file in TestComplete. I know the manual process to do so, suggested in https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/to-pdf.html, but I want to do that through scripting.
Thank you
Solved! Go to Solution.
Thanks for your suggestion.
While exporting the logs to a PDF file manually, it's looking nice to me. I was looking for a single file. But as it is not possible to get PDF through scripting, I will export the test logs to a .MHT file.
Doesn't look like PDF is an option:
Hi @KP13,
I agree with Marsha, at the moment, there is no built-in feature to export a PDF file from script. Only manual exporting is possible. Are there any specific requirements for exporting to PDF? TestComplete provides an easy export of test logs to an MHT file. In this case, all information will be stored in one file and it's easy to share it.
Thanks Marsha_R.
Yes. Currently, we are using the similar type of Python script to save the TestComplete report as a html file.
Thanks for your suggestion.
While exporting the logs to a PDF file manually, it's looking nice to me. I was looking for a single file. But as it is not possible to get PDF through scripting, I will export the test logs to a .MHT file.
Hi,
If export to .mht works for you then it's nice. Note, that .mht file can be opened in IE browser only, but not in Chrome and Firefox.
If you still like to have .pdf...
As an idea: You may
-- export log to .mht or a set of .html files, then
-- start separate instance of IE (through the COM to make IE not displayed on the screen, though this is optional), then
-- open exported log in IE and
-- print to .pdf via code.
-- Use generated .pdf and do cleanup for the exported log and IE instance.
Note: I do not expect that this printed .pdf will be of significant help because of absent screenshots, missed contents of the Additional Info log pane, etc.
good idea though @AlexKaras , even if it might not be very practical.
@TanyaGorbunova isn't there an open feature request for test log export to pdf?
i know that a lot of folks are interested in the ability to export test logs to pdf from code, and i think i remember seeing this requested in the past but cannot find the feature request list.
@dbattaglia Feature requests is the last forum on the main page here:
https://community.smartbear.com/t5/TestComplete/ct-p/TestComplete_forum
User | Count |
---|---|
63 | |
16 | |
11 | |
11 | |
8 |
Subject | Author | Latest Post |
---|---|---|