UFT API Exception Error when calling a UFT script

QTP/UFT Published on:
patch update

Just wanted to write a quick post to let you know how to fix an odd Service Test issue I've seen on some machines when calling a QTP test. When trying to call a QuickTest Pro script from Service Test I sometimes get the following error:

Exception thrown:

System.IO.FileNotFoundException: Could not load file or assembly ‘QTObjectModelLib, Version=, Culture=neutral, PublicKeyToken=401b5ce927043bc7' or one of its dependencies. The system cannot find the file specified.

No worries – turns out this is a known issue!

What cause this UFT Exception?

This error usually occurs in Service Test due to a missing all named QTObjectModuleLib.dll. This DLL should be located in your Service Test's Installation\bin folder

How to fix UFT API Exception Error

The easiest way to resolve this error is to manually copy the QTObjectModuleLib.dll from the ST install to the bin folder. To do this:

  • Navigate to the Service Test install's STSetup\MSI\bin folder
  • Find and Copy the QTObjectModuleLib.dll

  • Paste to you ST Bin folder
    • For 32-bit OS the default ST install folder is C:\Program Files\HP\HP Service Test\bin
    • For 64-bit OS the default ST install folder is C:\Program Files (x86)\HP\HP Service Test\bin
  • Now try calling a QTP script from Service Test – the error should not appear

Issue Resolved

Cool — the Service Test Exception error should no longer appear!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

patch update