Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS One Note 2010 support from QTP 11.0
#11
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks.

I can get passed that line .But there is some other issue now.
The error shows up for OneNote2PDF file .It says :
OneNote2PDF detected error and product is closed .
If you just edited some information, that information might be lost .

There are then debug and close buttons.Debug doesn't help here .

Y'day when i ran the script, it worked fine .I haven't changed a single thing with the exe .Not sure whats the error is for.

returnedStatusCode=-1073741819 .I don't think this error code helps .
I have followed the steps 1,2,3 as you said ,calling print action after the 16th line.

Thanks,
Prachi
Reply
#12
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello.

This could never be your fault. I must appreciate your patience. And that error code you sent really helped.

I installed OneNote 2010 yesternight and made some changes to the sourcecode for the utility. It took me a while to wrap my head around the new API but finally it worked!

I'm attaching the updated utility with this reply. Please replace the one I sent earlier with this new one and re-run the script.

Also, please make sure that you have .NET 3.5 installed. Usually, that is the case with most flavors of the Windows operating system but just to be sure, check if you can navigate to this directory on your machine: %windir%\Microsoft.NET\Framework\v3.5

I'm hopeful that it'll work flawlessly on your machine this time.

I'm all ears to hear the results.

Note: Please scroll down right to the end of the post to get the attachment. I couldn't attach it in-place for some reason.

Cheers,
Light.


Attached Files
.zip   OneNote2PDF.zip (Size: 18.48 KB / Downloads: 101)
Reply
#13
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi ,

It still shows the same error . What could be the possible reason!

what add-ins are you using while running the script?
Is there some problem with Adobe Reader X on my machine?
Is the location of utility causing issue : I have both the actions, OneNote2PDF ,itextSharp.dll in the same location,a folder in the desktop.
Do I need to change anything here:
nameOfPdfFile = Environment("ActionName") [line 7]

Pls suggest.

In addition to the error message I mentioned earlier,here is the Visual Studio JIT debugger message,which says

An unhandled exception ('system.NullReferenceException') occured in OneNote2PDF.exe [10964] .

Pls share how you get the details about the last error number I sent ?

Reply
#14
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi.

That's strange. Let's step back and examine a few things:

1. Which OS do you have?
2. If possible, please go to the line where we invoke the utility and turn the 0 into 1. It's the last but one argument. When the console window opens, please capture the log.
3. Did you verify that you have .net 3.5 installed by navigating to the folder I mentioned earlier?

I had only web add-in running when I last tested it. There couldn't be a problem with Adobe Reader since basically we're not being able to generate the PDF yet. The location of the utility also doesn't seem to be a problem as long as you have iTextSharp.dll in the same folder as the utility. Remember, this dll shouldn't be in a child folder but in the same location as the utility.

Also, have you made sure that you are using the utility that I sent you and not the one that came with the dll from the link?

To check whether you need to change that variable's value or any other variable's value, I'd suggest that you put a breakpoint on the first line and then carefully note the value of each variable till the utility is invoked. This way we can be sure that we're invoking the utility properly. You may also want to add a watch to whole of the expression inside oShell.Run to check what actually we're invoking. Can you post the values in your reply?

About the last error code you sent, it only told me that there was a null reference exception and I suspected the namespace was changed in Onenote 2010 on the basis of that. It also helped me verify if I was reproducing the right error when I tried it at my site.

I'm also thinking of modifying this utility one more time to write an extensive log somewhere so we could check in detail why it's not working. I'll upload it later today.

Now that it's been working in my machine, we're sure that the idea is sound; it's just that we need to get it working on your machine.

Please reply with as much information as you can. I'm confident that we can solve this eventually.

Thanks,
Light.
Reply
#15
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello.

I've learnt something here. No matter how simple or complex some code is, whenever one distributes code, one should include all relevant information in an external log file. I kind-of knew that and yet didn't stick to it causing some time loss (and some hair loss too). I'm sorry about that.

Let's not bang our heads against the error-pole anymore. You can effectively ignore my earlier post where I'm asking questions as if sitting in a dark room with no clue about what light is.

This time, I've used logging statements with abandon in this latest executable. When you run the utility now, it will produce a very detailed log file at the same location where the utility resides i.e. in the folder at your desktop. It will be named: OneNote2PDFDetailed.log

All we have to do is examine this log file to pin-point where the exception is occurring. Since there is going to be a lot of contextual data in the log, I'll be able to fix the problem in a jiffy.

Now, you have to do the following things:

1. Download the attachment.
2. Extract the utility and replace the old one with this new one.
2. Extract the configuration file and place it in the same folder as the utility.
3. Run the script.
4. Send the log file to my email address. Please don't upload it here on the forum. You can send an email to me by clicking on my name in the post and then clicking "Send Light an email" link.
5. Relax!


.zip   OneNote2PDF-WithLoggingAndConfig.zip (Size: 22.16 KB / Downloads: 89)

*Note: If there're any issues with sending the log file to me through the forum, please let me know. I'll communicate my email address to you or you can leave yours there.

When we're done with debugging, we'll turn off this detailed logging by flipping the switches in that file to value 0. But that will come later. Let's first fix it!

And once again, thanks for your patience and trust.

If you have any trouble following the instructions or have doubts / questions, please write right back.

Cheers,
Light.
Reply
#16
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

I do not find the 'send email link' in your profile .

This file will have details upto the point where I get that error message.
Scripts stops when i click close .

w.r.t. to your earlier post :
Operating system: WindowsXP and .net 3.5 is installed .

Thanks for your help .
Reply
#17
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi

Apparently, this link becomes available only when you have added the other as a buddy. I've left you my email address. Please send the file to that address.

Also, it is okay if the log ends when utility and your script stops. Because of the information logged upto that point, I can figure out what's wrong plus how to fix it.

Cheers,
Light.
Reply
#18
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello.

There seems to be a problem with the messaging functionality of the forum. Today, it said to me that it's been disabled by the administrator. I wonder how it allowed me to send a message to you yesterday. Sad. It should at least have notified me that you wouldn't be able to read the message.

Seeing no recourse, I'm pasting my email address: someone@example.com

Can you send that file here?

Thanks,
Light.
Reply
#19
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Sorry for the delayed response .
I have sent the file to your e-mail id.

Thanks,
Reply
#20
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello, it's alright. I've tried to fix the issue. Please check your email.

* Note to all readers: Because most of our discussion will now revolve around the log files (non-public), it does not make much sense to post it here since it will only cause confusion. I'll return to the forum when there is content that I believe could help everyone.

Thanks,
Light.
Reply


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

Forum Jump:


Users browsing this thread: 2 Guest(s)