3

I follow an example from SO answer how to run QTP script from C#. However during Application object creation I get UnauthorizedAccessException. Any clues what might be wrong? Here is a screenshot of the exception and the source code.

enter image description here

Community
  • 1
  • 1
Greg Dan
  • 6,198
  • 3
  • 33
  • 53

2 Answers2

0

If you're on Windows 7 or Vista, have a go at starting your development area as Administrator, chances are you're getting an Access Violation.

Paul Talbot
  • 1,583
  • 1
  • 14
  • 28
0

Quoting the OP of the original post you refer to:

This code did work. However, for QTP version 10.0, I had to change using QTObjectModelLib; to using QuickTest;.

Might help if you are also using version 10.0.

Danra
  • 9,546
  • 5
  • 59
  • 117