Depending on what version of UFT you're using, follow the below steps to try to resolve the issue. Please let us know if this works by accepting this answer or commenting if it does not.
**UFT 12.02 Patch 2 (or later patch)**: Use either of below:
- Manual: Before running AOM code:
1. Access Windows Registry
2. Navigate to HKEY_LOCAL_MACHINESOFTWAREMercury InteractiveQuickTest ProfessionalMicTest
Note: If using Windows 64bits, access HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMercury Interactive...
3. Modify (or create if not existing) DWORD, named ''ForceUseQtpLicenses'' with value 1
- Programmatic: Use below BEFORE AOM script logic/code:
CreateObject(''WScript.Shell'').run ''cmd.exe /C REG ADD ''''HKLMSOFTWAREMercury InteractiveQuickTest ProfessionalMicTest'''' /v ForceUseQtpLicenses /t REG_DWORD /d 1 /f''
**UFT 12.51 or later**:
1. Do not use AOM method ''QuickTest.Application.UseLicenseOfType''
2. Select what license to use, with either of below options:
- Manual: Run FT License Installation Wizard, to selected desired license to use, then run AOM script. For more information, see Document ID KM01772743 - How to launch the Autopass License Installation Wizard?
- Programmatic: Use attached ''ChangeLicenceFeature'' function, BEFORE AOM code (still not using UseLicenseOfType).
Note: The provided script/function is provided for example purposes only. It is not supported by Hewlett Packard.
This information can be found in Micro Focus Document [KM01824165]. Per this document this error is caused because ''By default UFT is configured to consume the full license feature, such as UFT feature, before any other.''