QTP/UFT tip: Using OTA in UFT API test shows "Could not load type 'TDAPIOLELib.ITDConnection6'
Using “TDAPIOLELib.TDConnection qcConn = new TDAPIOLELib.TDConnection()” from OTA (Open Test Architecture) Library in UFT 11.5 API test, this error message appears: "Could not load type 'TDAPIOLELib.ITDConnection6' from assembly 'Interop.TDAPIOLELib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null'."
However if this is used in Service Test (ST) 11.2 the command works properly.
The error occurs because of the version of .net framework, on UFT API test the framework is .net 4.0 and in ST is 3.5, so the Interoperability fails.
In order to use a OTA connection that works properly in UFT APItest use this comand to start a conection:
TDConnectionClass qcConn = new TDConnectionClass();
If you find that this or any post resolves your issue, mark it as an accepted solution.
Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.