Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS One Note 2010 support from QTP 11.0
#26
Solved: 10 Years, 9 Months ago
Hello. Smile

We'll first fix the issue around the date and only then we'll introduce any new changes for the next step. Apart from other things, please also tell me how the date and time looks like on your system clock usually displayed at the bottom-right corner. I need the exact formatting.

To answer your question:

You said you deleted the log file before re-running the script, which is fine. The file should be regenerated in the same folder.

Also, how are you actually printing the things? Is there a way to "force wait" until the print operation finishes? So, when this action is resumed after "Printing Action", we're always sure that the printing had actually been finished.

I've tried many things for the next step i.e. searching for a "success word". It is proving to be much more challenging and unreliable than I had expected.

First, as soon as your application prints anything, it becomes a graphic even when it looks like text so we can't search for a "success word" until we OCR (Optical Character Recognition) the graphic through some means.

I tried running the OCR on the pdf that we're generating but that fails because OneNote only publishes the graphic, which is not an image (e.g. JPG, PNG, BMP, TIFF etc.). OCR can only be done on some kind of image.

To work around that, I modified the OneNote2Pdf utility such that it converts the graphic from OneNote into Tiff (image format) and then re-creates the pdf so it now contains Tiff images of the pages printed by your application. Now, we can run the OCR on the PDF.

But, there are two problems:

1. Adobe Acrobat Professional doesn't allow performing OCR programmatically from outside (QTP, .NET, Java, etc.)

2. There are tools (QTP internally uses ABBYY FineReader) that can do this job but they all will cost your company some money. So, I tried an open source tool: Tesseract which didn't do a very good job on my prints so it affected my confidence in Third-Party OCR tools. There's one Puma.NET tool as well with which I haven't experimented too much. I'd do so in coming days.

In a bid to solve the first problem, I tried to use QTP's declarative programming to automate OCR as if a user was doing it in Adobe Acrobat. Through this, I could successfully capture the text from the PDF but it bloated our Results Window with all those actions that were performed by QTP on Adobe Acrobat Professional window. After getting the text from pdf, I used InStr function to check for the presence of a "success word." It worked fine, indeed. How do you feel about this solution?

There is yet another way left, which is to first write a small Acrobat Professional plug-in in C++ language, which will invoke the OCR on the pdf. We'll expose this plug-in as a COM interface, which will then be callable from QTP script. The only reasons why I didn't write this yet is because I've forgotten C++ programming and reading Adobe documentation is a pain in the neck. Smile But, if you think the DP solution isn't elegant, I'll attempt to resurrect my C++ compiler. This one is also the recommended solution by Adobe.

Thanks,
Light.
Reply


Messages In This Thread
RE: MS One Note 2010 support from QTP 11.0 - by Light - 07-18-2011, 02:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP support for extjs applications adityasrinivasb 0 3,324 08-20-2013, 11:08 PM
Last Post: adityasrinivasb
  Does QTP support Adobe CQ and Microstrategy kamalteja 0 2,710 03-29-2013, 03:42 AM
Last Post: kamalteja
  QTP does not seem to support xhtml based java objects siva.kanukollu@yaho.com 0 2,678 01-16-2013, 05:03 PM
Last Post: siva.kanukollu@yaho.com
  Does QTP support Teleric and Dev-Xpress 3rd party tools, if yes how? Dharnish 0 2,242 09-19-2012, 04:32 PM
Last Post: Dharnish
  QTP 11 support for firefox qtplearner88 3 4,935 07-19-2012, 07:43 AM
Last Post: vIns

Forum Jump:


Users browsing this thread: 2 Guest(s)