Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS One Note 2010 support from QTP 11.0
#31
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi. Bingo! I saw the log file you sent me.

You've used the wrong executable. You've used the executable that I sent you on 12th July. This was when we introduced logging because we were getting the returnedStatusCode = -1073741819. So, if you use the same executable again, it will throw the same error! Smile

You must use the newest executable and the config file that I sent to you on 14th July through email. I've also attached those here again.

I think you have parallel versions of the executable and the script. In the log, I also saw the argument: -UseUnfiled going. We removed this already. We also removed -ExportNotebook True. Just for clarity, I've attached the script too.


.txt   CheckPrintedPages_Updated.txt (Size: 4.41 KB / Downloads: 83)

What I suggest is that

1. Create a completely new folder for just the conversion utility.
2. Then, download the zip that I've attached with this reply in some location. It contains that 14/07 executable and the config file.

.zip   OneNote2PDF-ImprovedAlgo.zip (Size: 22.75 KB / Downloads: 87)

3. Place just the exe, the iTextSharp.dll and the config file in the new folder that you created.
4. Update the value of the variable: pathToConversionUtil in the script so it reflects the full path of the conversion utility that you placed in the new folder (created in step 1).
5. Run the script.
6. Collect the log file from the new folder.

Thanks,
Light.
Reply
#32
Solved: 10 Years, 8 Months, 3 Weeks ago
Hello ,

I remember not replacing the exe anytime after it ran successfully first.But it didn't work,so there must be some difference .

Anyways, when I ran this time with the one you sent in last post , it worked fine Smile . It took around 15 minutes and it printed all 2595 pages.

Regarding the questions in your last post : The OneNote is open during the pdf conversion and there is no Onenote manual intervention while the script runs.

Thanks again Smile I will send you the latest logfile in mail .

Thanks,
Reply
#33
Solved: 10 Years, 8 Months, 3 Weeks ago
Great! Smile

It's lovely news that we now have a log file too. Please send it to me.

I'm still wondering about what could be modifying the lastModifiedTime of 2595 pages! I'm keeping my fingers crossed.

Also, about searching for the "success word." I'm leaning more toward the plugin approach but haven't got anything working yet.

Cheers,
Light.
Reply
#34
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi.

Thank you for the log file. I've gone through it and surprisingly, in it there is no evidence of it printing 2595 pages! From what I've seen, it's not even considering exporting as many as 2595 pages! Now, it's turning into a Forensic Research case. Tongue

Here are the details:

1. 1st Run (21st July 7:53:47):

a. The utility identified that no pages were printed by the application and exited with Error Code = -99.

Now, your script must have recorded the failure of this checkpoint with the message: "No pages were printed by the application."

Did you notice this in the Results window?

2. 2nd Run (21st July 7:55:11):

a. "Untitled Page" in Section4 of OneNote_RecycleBin of Personal notebook exported because it was newer (2011-07-21 10:25:15).

b. Created the final PDF file @ C:\Documents and Settings\username\Local Settings\Temp\3\TempResults_1\PdfDocs\OneNote2.pdf

The log is absolutely normal and records the publishing of just one page, which was most likely the one printed by your application.

Did you notice the pdf opening in this case? Did it have more than one page in it?

3. 3rd Run (21st July 8:19:17):

a. "Untitled Page" in Section4 of OneNote_RecycleBin of Personal notebook exported because it was newer (2011-07-21 10:49:20).

b. Created the final PDF file @ C:\Documents and Settings\username\Local Settings\Temp\3\TempResults_1\PdfDocs\OneNote2.pdf

Again, the log is very normal and records the publishing of just one page, which was most likely the one printed by your application.

Did Adobe Reader open this pdf with only one page for you?

In a nutshell, here are my observations:

1. It should have recorded failure of the checkpoint with the message: "No pages were printed by the application" for the first run.

2. It should have shown you a pdf with just one page in both the second and the third instances.

Now, we need to figure out where is the divide.

Prachi,

1. Can you go look at the path: C:\DOCUME~1\username\LOCALS~1\Temp\3\TempResults_1\PdfDocs and locate OneNote2.pdf in there?

2. I understand that you're using the temporary results path so it may be overwriting everything inside with every run. Can you try using a more permanent path while running the script so we could examine those PDFs later?

3. How did you figure out that the pdf had 2595 pages?

4. Did the pdf that opens automatically have those many pages? Were there any blank pages?

5. How many times did the PDF open automatically?

6. Which instance showed you 2595 pages in the pdf? The first, the second or the third?

7. Never did you receive a SUCCESS result for the checkpoint? Did you ever get a FAILURE as indicated by the log for the first run?

8. Also, do you know how the pages landed up in Recycle bin?

9. The timestamps on the newer pages are around 2.5 hours in future in relation to when you're running the script. How is this possible! Do you have some idea? Are there different timezones in play?

Overall, looking at the log, I'm satisfied with the job the utility has done. I couldn't spot any aberration from what I was expecting from the executable. So, we need to figure out what happens incorrectly after the control leaves the executable or the way things are getting printed.

Can you please answer my questions above? Excuse me for firing a volley of questions. I'm just too curious.

Cheers,
Light.
Reply
#35
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi ,

I hope to go clean in this Forensic Research case Smile

This time it took longer for the script to finish ,almost 30-40 mins .

My response :
1. Can you go look at the path: C:\DOCUME~1\username\LOCALS~1\Temp\3\TempResults_1\PdfDocs and locate OneNote2.pdf in there?

--.It gives error when I check for the path at run prompt:
C:\DOCUME~1\username\LOCALS~1\Temp\3\TempResults_1\PdfDocs location is unavailable .
But When I search for OneNote2.pdf ,it shows me the PDF in above path.

2. I understand that you're using the temporary results path so it may be overwriting everything inside with every run. Can you try using a more permanent path while running the script so we could examine those PDFs later?
--I have saved the PDF @ C:\Documents and Settings\username\Desktop\OneNoteAll . It's 9862 KB ,3781 pages .
Page count has increased as I had some other assignments for OneNote (these other tasks were done when the script wasn't running Smile )

3. How did you figure out that the pdf had 2595 pages?
--The PDF which gets generated after every run shows these many pages.
Today the page count was 3781 .
4. Did the pdf that opens automatically have those many pages? Were there any blank pages? --Yes, the automatically opened PDF had 2595 pages and yes the last 1000+ were blank.I think because of the memory issues it doesn't load.

5. How many times did the PDF open automatically? - single time per run .

6. Which instance showed you 2595 pages in the pdf? The first, the second or the third? -- last two. First was stopped in b/w due to an application error.

7. Never did you receive a SUCCESS result for the checkpoint? Did you ever get a FAILURE as indicated by the log for the first run?

I received a SUCCESS result for the checkpoint as Passed.
Details :The pages printed are fine and a pdf is available @ C:\DOCUME~1\pandeypr\LOCALS~1\Temp\3\TempResults_1\PdfDocs\OneNote2.pdf

8. Also, do you know how the pages landed up in Recycle bin? --
I moved the OneNote to recycle bin to have a fresh OneNote for the next print.So that it doesn't print 2595 pages but just a single one.But it didn't help. Also,at the top of OneNote there is a status message kind of thing which says:"content here is deleted after 60 days" .To restore right-click and move it out of recycle bin ."

9. The timestamps on the newer pages are around 2.5 hours in future in relation to when you're running the script. How is this possible! Do you have some idea? Are there different timezones in play?
--Yes,2.5 hours difference is because of different time zones .

Thanks,
Reply
#36
Solved: 10 Years, 8 Months, 3 Weeks ago
Lol! Smile

You were never a suspect because I knew you spent three hours looking at the massive pdf file when it first showed up! Tongue Right now, the prime suspect is "Time Zone Difference."

I'll reflect on your answers and share my thoughts with you. I'm also thinking of recreating a OneNote portion on my machine similar to what you have in yours. We'll figure out what is wrong. If I needed more information, I'd post more questions.

Thank you for your continued trust and patience.

Light.
Reply
#37
Solved: 10 Years, 8 Months, 3 Weeks ago
Hello.

I've enhanced logging and included time stamps to see where the utility is spending its time. Hopefully, that will help us in figuring out how those many pages are getting printed. Also, now the utility won't consider the pages sent to OneNote Recycle bin.

Please replace the older executable with this:

.zip   OneNote2PDF-EnhancedLogging.zip (Size: 25.62 KB / Downloads: 85)

Can you please shed some light on this time zone difference? Is your local time different from what application uses? Have you changed the time zone on your machine? Or, you have just modified the time without changing the time zone?

When you send me the log file the next time, please also quote the exact start time of each run in IST to aid the analysis. Now, the log would start with the statement: "********************* BEGINNING LOGGING @ Current_Date_Time" So, you can check the log to make sure that you used the right executable.

Cheers,
Light.
Reply
#38
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi ,

I have run the script with latest executable and it fails with error
"There was a problem accessing the OneNote application" . (1st run )

I ran it again with the old exe just to make sure everything else is in place and it worked fine with success results . (2nd run)

I will send both the logs today .

The first run was at 1:45 pm IST and second at 2:05 pm IST .
Also, the logs/lastPrintedTime capture the server timings and not that of my local system .

Thanks,
Reply
#39
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi Prachi.

This afternoon, a thought struck me. Could it be that the single page that's correctly showing up in the log is itself that much big? This can happen if, with every print, OneNote is configured to add to the lone page in the same section and not create a new page in that section.

Fortunately, we can change this behavior. Can you follow the steps I've written below?

1. Open OneNote 2010 client in the machine where your app is printing things. This should be the same machine where we're doing all this exercise.
2. Manually navigate to the section where you want all printing to happen. For example, Section4. But, this shouldn't be in Recycle Bin.
3. Click on File -> Options available on the left-top corner.
4. From the navigation menu on your left hand side in the dialog box that opens, select "Send To OneNote"
5. Locate the option: "Print To OneNote" under "Other Content" in the lower part of the right frame.
6. From the dropdown beside it, select "To new page in current section"
7. Click "OK"
8. Close OneNote.

Now, what will happen is that everytime you print something to OneNote in this machine, it will create a new page in this section. This way, we'll get the pages printed last after the time we've mentioned. I hope modifying OneNote configuration doesn't contravene any of your application requirements.

This is how it's set up in my machine.

Also, I saw the log and realized that while trying to skip the pages resting in recycle bin I introduced a bug. Sad Sorry, my bad... I was able to reproduce the problem here and have fixed it. Attachment is below:

.zip   OneNote2PDF-RecycleBinBugFixed.zip (Size: 25.54 KB / Downloads: 80)

Try this and let me know.
Reply
#40
Solved: 10 Years, 8 Months, 3 Weeks ago
It worked Smile
It prints only one page now to PDF and complete run is finished in 1 min.
Thanks for your time and efforts .
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP support for extjs applications adityasrinivasb 0 3,307 08-20-2013, 11:08 PM
Last Post: adityasrinivasb
  Does QTP support Adobe CQ and Microstrategy kamalteja 0 2,698 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,663 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,227 09-19-2012, 04:32 PM
Last Post: Dharnish
  QTP 11 support for firefox qtplearner88 3 4,911 07-19-2012, 07:43 AM
Last Post: vIns

Forum Jump:


Users browsing this thread: 1 Guest(s)