21 Things To Try When UFT Does Not Identify an Object

Object Identification errors are the bane of automated testing tools. UFT One* isn’t immune to that either. When working on UFT One, you would often encounter the dreaded pop-ups related to object identification errors.

Here are 21+ practical tips to try when UFT One does not identify an object.

UFT/QTP First

Object identification techniques in UFT (formerly QTP)

I have repeated this many times in the past and it is still remains the #1 object identification tip. While testing on any app, make sure UFT/QTP is opened first and then your application. UFT works by hooking into your application. If you open UFT after your application has started there are chances that UFT may not be able to identify objects.

Load relevant Add-ins

Make sure you have loaded ALL the relevant add-ins required for your Application Under Test (AUT).

Record and Run Settings

While working on web based applications, make sure Record and run test on any open browser is selected under Record > Record and run settings.

BHO Manager

Make sure BHO Manager in IE under Tools > Manage Add-Ons > Enable or Disable Addons is enabled.

Enable Extensions

If you are working on Firefox or Google chrome browser, don’t forget to enable browser extensions.
In case of Firefox go to Firefox menu > Add-ons > Extensions and enable Unified Functional Testing Extension .
For Chrome go to Tools > Extensions and enable Unified Functional Testing Agent.

Disable Protected Mode

In IE, clear the Enable Protected Mode option under Tools > Internet Options > Security

Data Execution Prevention

Data Execution Prevention (DEP) is a technology by Microsoft to protect your machine from running malicious code and viruses.
In a given machine, DEP can be set to Always On or it can be set to On For Essential Processes.
if you are on Windows 7 64 bit or Windows Server 2008 R2 or in general having a hard time with UFT behaving inconsistently, you may want to set DEP to the latter option. Here is how it can be done on Windows 10 (procedure for earlier OS like Windows 7, XP would remain the same)

DEP and UFT

Hit Windows + R key combo. The shortcut to go to DEP window direct from Windows run dialog box is SystemPropertiesDataExecutionPrevention (copy-paste the command). You will get this dialog box.Now ensure that the first radio button is selected and not the second.
If for some reason the shortcut doesn’t work in your machine, you can:

  1. Right click on Windows Start logo
  2. Click System
  3. Click Advanced System Settings on the left side
  4. Under System Properties dialog box, go to Advanced Tab
  5. Click Settings… button under Performance section
  6. Go to Data Execution Prevention Tab.

Here you will find the same options as shown in the image above.

User Account Control(UAC)

UAC was introduced in Windows Vista and continued in Win 7, Win 8/8.1 and Win 10. UAC can interfere with your application. It is a good idea to disable it while working on QTP.

Zoom Level

Make sure the zoom level is set to 100% while testing in any browser. Check the illustration below on how zoom-level affects highlight object functionality in QTP. (Focus on the blinking black rectangle on the left once the Highlight button is clicked on the right.)

A shortcut key to get back to 100% zoom is Ctrl + 0 (that’s zero).

Windows Scale Settings

This was found to be the root-cause for several users especially on Windows 10. Ensure the Windows scale settings ( Display Settings > Scale and Layout ) are set to 100% .

Windows 10 scale settings

UFT stops recognizing objects randomly

There are times when UFT would stop recognizing web objects during replay. This may happen randomly which means sometimes the object may be recognized and other times it may not be recognized with the exact same configuration of your tool, machine and script. It may lead to unnecessary frustration.

Most of the time the issue is related to javascript which may not have rendered the web objects to DOM but the UFT has already hooked onto the browser.

Use an undocumented method .RefreshWebSupport in such situations.

Syntax: Browser("Browser").RefreshWebSupport

.Object Notation

There are times when identification properties are not enough to identify an object. You may make use of native properties in that case. Use .object notation to locate the erring property. Make sure to correctly identify it.

Low level recording

After you have exhausted all options you can try Low level recording. It’s not a good method from maintenance point of view but it may come handy at times.

My QTP/UFT scripts have worked for ages identifying objects correctly, stopped working since yesterday

If something like that has happened probably there is some change in your Windows OS or browser or UFT software itself. Try to disable Windows auto-updates on machines where QTP is installed.

My QTP/UFT web scripts were working fine till the last version but since the time I have upgraded to UFT 12.52, UFT is identifying objects incorrectly.

UFT 12.52 and above versions have the ability to recognize web objects based on their HTML role attribute, using the Web Accessibility toolkit. This capability is enabled by default in UFT versions 12.52 and above. For example, if an image object has a role attribute defined , UFT may recognize it as a WebButton objects instead of an img object.

While this change is done for better object identification abilities in UFT. It may cause object identification issues if you are migrating scripts from others versions of QTP/UFT to UFT 12.52 or above.

To make sure UFT 12.52+ versions continue to identify objects using without using Web Accessibility , you can choose to disable Web Accessibility support.

It can be done by going to registry OR through script in Editor. We will show you both the ways

disable web accessibility in UFT

Disable Web Accessibility support through Registry

  1. If you are on 64 bits Windows OS, Go to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Mercury Interactive\QuickTest Professional\MicTest\Packages\WebPackage\Settings
    If you are on 32 bits Windows OS, Go to HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Packages\WebPackage\Settings
  2. Update key EnableWebRoleBasedKit to 0

Disable Web Accessibility support through UFT Editor script

Use this statement at the start of your script to disable Web Accessibility support in UFT
Settings.Package.WebPackage("EnableWebRoleBasedKit")=0

Use this statement at the start of your script to enable Web Accessibility support in UFT
Settings.Package.WebPackage("EnableWebRoleBasedKit")=1

Google Chrome browser stopped identifying Objects

Chrome has a habit of auto-updating itself whenever a new version is released. If your UFT scripts are working fine for a particular version of Chrome and there is no real requirement to remain on the latest version, you can disable automatic chrome updates.

Type property for WebButton class

If you’re testing cross browser, don’t use Type property to identify Webbutton class since the default value is different for IE (button) and Firefox (Submit).

Object with dynamic properties

If QTP was successfully able to identify object at record time but unable to identify the same object during replay time, there are chances that object properties are dynamic in nature. Make use of regular expression or parameterization to handle those dynamic values.

Version of Browser and Windows OS

Make sure the version of QTP you use supports the version of your browser and/or your Windows operating system. Check the complete UFT vs browser support matrix and UFT vs Windows support matrix.

Pop-up Window not identified?

Install relevant patch

In case your application version is not supported by the version of QTP, keep an eye on various patches that HP comes up with from time to time. Check the complete support matrix of QTP/UFT with various technologies. We strive to keep this up-to-date.

QTP Forums

If nothing works for you, you can ask your question at QTP forums. Please make sure your question is detailed enough to solicit good responses.

That’s it from my side.

*In case you are wondering, UFT has been renamed to UFT One with the launch of UFT One v15.

You can download this article as an eBook for handy reference.

You Should Read These 3 Related Articles Too!

65 Comments

Mahesh on Dec 20, 2017 at 13:56

Hi Ankur, I am working on UFT14 and checking for browser compatibility for ChromeV56 and FF-V51 for a web application, I have designed the script for IE and using the same for Chrome and FF, Script is able to identify the objects till the login page, when the security dialog comes in after clicking login, userid and password fields are being identified as webelements instead webedit. Can you please suggest , how can i proceed the execution on Chrome. Reply

Mahesh on Dec 20, 2017 at 13:59 sorry it was winedit in windows security dialog, not webedit Reply priyanka on Dec 18, 2017 at 14:46

Hi I am using uft 14. Now i am trying to identify object which are using Delphi berlin 10 and Dev express 16.2 but uft 14 is not recognizing objects. Reply

Pawan Sasane on Aug 22, 2017 at 18:20

While recording script with UFT 14, my recording stopped with this step:
Window(“Window_2”).Click 249,76
Window(“Window_2”).Click 225,69 Can anybody help me out from this? I know this is a minor issue but the time was limited to find out solutions anywhere else. Reply

Abhijit Maity on Jun 30, 2017 at 22:31

A array like(6,5,2,8,3,4,8). when 3 array value sum=10 it display pass message with number, how to write code. kindly suggest. Reply

Abhijit Maity on Jun 30, 2017 at 22:23

A web page having two web edit, when we set today date in 1st web edit and after comes 2nd web edit it should be display tomorrow date. How to write the script using QTP. Please suggest. Reply

Ankur Jain on Aug 16, 2017 at 12:56 @Abhijit: Use date built in function. Reply Imre on Apr 19, 2017 at 21:29

Hi Ankur, something is wrong with our UFT 12.50, running on a Windows 7 Prof. 64 bit machine.
The Object Spy does not work with Chrome (Version 55.0.2883.87 m). It shows “Window: Google Chrome”.
Strangely we can record and replay in chrome and the repository will generated as expected.
Within IE, the Object Spy works fine.
Any idea? Thanks
Imre Reply

Ankur Jain on Apr 22, 2017 at 10:53 @Imre: Check the Matrix for support. Also upgrade to UFT 12.53 Reply Esther on Feb 20, 2017 at 17:29

I have a lot of tests and Objects using UFT 12.53, I upgraded to UFT 14, since the Objects are not recognuzed any more. what should I do to fix this problem?? Thanks in advance,
Esther Reply

Ankur Jain on Feb 24, 2017 at 13:53 @Esther: Check the PAM for any incompatibility of your app with the latest version. Reply Monesh Panchal on Jan 25, 2017 at 12:49

Hi Ankur, I’m working on CRM application when i signed in application there are some tabs are there (tabs are identifying as a link) need to click on one of the tab. If i highlight OR locate manually its working fine but while run time those objects are not identifying by UFT. I have UFT 12.50. Please assist. Regards,
Monesh Panchal. Reply

Ankur Jain on Feb 2, 2017 at 04:14 @Monesh: Check zoom level on your browser. It should be set to 100%. Reply Rajeswari on Nov 2, 2017 at 16:37

how did you login to CRM application from UFT i am working on automation new to UFT could you please help Reply

Shilpa on Jan 11, 2017 at 23:10 Web based objects are identified as windows based objects why? Reply Ankur Jain on Jan 11, 2017 at 23:44

@Shilpa: There can be several reasons. Check if: – QTP/UFT is opened first.
– BHO Manager is enabled in case of IE.
– Extension for UFT is enabled in browser, in case of Chrome/Firefox.
– If you are on UFT 12.52+ versions, make sure you disable Web Accessibility. Make sure you go through each and every point mentioned above carefully. Reply

shrikanth on Dec 2, 2016 at 09:00

Hi ANKUR, i am automating an e com application with chrome browser with UFT-12.53.
i am not able to even spy or handle popups showing in application with chrome browser like example application shows on top saying ” a schedule payment is already been submitted” . here i have to capture popup message and come out of execution.
please let me know how to handle this. Reply

Vinayaka on Nov 24, 2016 at 00:19

Hi Ankur, I am working on a Web based application and in many cases where my application is saving some data or navigating to another screen(Not another tab or page),When certain link is clicked my Application keeps loading till the other screen fully loads up, I have tried to use Browser(“”).Sync or Browser(“”).Page(“”).Sync but in UFT while execution these steps will run but the application will not sync with these steps or waits till the loading stops, I have also tried to Add the “Loading” WebElement to repository and used waitToProperty “visible”,False but the application will wait a longer time even though the Loading of application has stopped , Can you suggest me a good practice to handle this situation. Reply

Ankur Jain on Nov 24, 2016 at 14:00

@Vinakaya: Take help of Synchronization points Also check point #8 above.
For further queries not related to this article, please post your detailed question on UFT forums Reply

Vinayaka on Nov 19, 2016 at 18:24

Hi Ankur , I am using 12.01v UFT and chrome 12.02 v and In my script there is a scenario where Application downloads a file and a download bar appears at bottom for chrome, I tried spying on the bar but QTP does not identify it and identifys’s web page only and Hence due to this I am unale to close the download bar which is important. Is there any solution for this to handle from script itself rather than installing any addins or extensions for download bar to go away. Reply

Ankur Jain on Nov 19, 2016 at 18:54

@Vinayaka: You may use SendKeys or DeviceReplay to send key strokes when the Chrome window is in the foreground.
Ctrl + J will open downloads tab and Ctrl + w will close the current tab (in this case downloads tab). As soon as downloads tab is closed, the bottom download bar also goes away. Reply