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
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)
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:
- Right click on Windows Start logo
- Click System
- Click Advanced System Settings on the left side
- Under System Properties dialog box, go to Advanced Tab
- Click Settings… button under Performance section
- 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.
- To turn-off UAC on Windows 7, go to Start Menu > Search for “Change User Account Settings” > Disable UAC
- To turn-off UAC on Windows 8/8.1, you need to take help of registry. UI setting doesn’t truly turns-off UAC in Win 8/8.1. Hit Win + R key, type regedit and click OK. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
Find the key: EbableLUA and change the Value Data value to 0 - To turn-off UAC on Windows 10, go to Control Panel > User Accounts.
- Click on Change User Account Control Settings
- On the next window, drag the slider to the bottom and Press OK.
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%
.
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 support through Registry
- 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
- 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.
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.
sorry it was winedit in windows security dialog, not webedit
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.
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.
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.
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.
@Abhijit: Use
date
built in function.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
@Imre: Check the Matrix for support. Also upgrade to UFT 12.53
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
@Esther: Check the PAM for any incompatibility of your app with the latest version.
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.
@Monesh: Check zoom level on your browser. It should be set to 100%.
how did you login to CRM application from UFT i am working on automation new to UFT could you please help
Web based objects are identified as windows based objects why?
@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.
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.
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.
@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
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.
@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 andCtrl + 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.
Hi Ankur,
Thanks for the solution,This has solved my problem
@Vinakaya: Good to know that!
HI Ankur/All
I am using UFT 12.51 with IE11. I am not able to identify the objects .
Which scripts was working fine IE 08.
Browser Maximise is not working. could you please help me.
@Amulya: Check UFT 12.51 ReadMe if there are any known issues.
Thanks Ankur! I found it really useful
You’re welcome Pavan. Good to know they were useful for you!
Hello Ankur,
I’m trying to automate a Windows based application with UFT 12.51. I have started with adding all the objects to the Repository and then with scripting. My scripts were running fine until evening. Next day when I tried, it didn’t work and started throwing an error “Object’s parent window (Class Window) does not match with those displayed in the application”
I captured new objects and compared with the previous ones and didn’t find any difference.. all the properties seemed to be same. I have used Reg.Expression for properties like regexpwndtitle.
Could you please shed some light on how to handle Win objects better?
@Hemnath: It’s a wide subject and can vary because of lots of factors. Most of the points are covered in this article. Did you check pt#1 above?
Hi,
Can we implement distribute testing in UFT, if yes please let us know how to do distribute testing in UFT.
Thanks,
Cnu
Hi Ankur,
I am working a Window based application automation .I have installed QTP 10 version. I have recorded the script on Window application but found its not correctly recoding the application. I have selected Visual basic,Activex addins for this but still its not working…. The script which I have recorded is like “Window(..).WinObject(..)” , ideally it should take as “Window(..).WinEdit(..)…”..
Can you please help on this..Also I have a query, how to identify which addins are required for application under automation??
Thanks,
Manoj
@Manoj: Check QTP compatibility with your version of Windows. Best source is PAM guide which comes with every QTP/UFT installation.
Hi Ankur,
I have UFT 11.53 installed on my Win 7 machine. I have installed Firefox 14 and Chrome 30. I am not able to identify objects in both the browsers. I have also enabled Add Ins in browser.
How can I solve this issue?
Hi, I am using UFT 12.51 with firefox version 37.0.2 . There are few webedit fields which take the input value sometimes when script is executed but not always.For other WebEdit fields it is working(it is actually a weblist but we can edit and set value in it) I am using OR. I am not sure why this is happening. Please help.
Hello,
Sir, will you please tell me that I am not able to fetch object from chrome and firefox through UFT 12. I tried to upload the extensions for the chrome as well as for firefox but it doesn’t support. I want to now that there is a need of patch for object identification. Please reply me as soon as possible i have to perform action over it.
@Bhavika: Ideally there shouldn’t be a need to upload the extensions. They are installed with the UFT installation itself. If you have followed all points above and still you are facing issues – Please ask your detailed query on QTP/UFT forums
Hi Ankur,
I had following question. In One of my friends project using UFT 12 for java based desktop application automation. But problem is that he is not able to object spy on child objects i.e. for example, he is spyipng File menu and its sub options but it is only recognizing its parent window (where those menu items placed) but not file menu or any other menus.
Can you please let me know what could be the problem? Do we need to install java addin for this? If yes, what other addins need to be selected along with this? Or this is not a problem with addins?
please reply on this immediately!
Hi Ankur,
We are working in UFT12.02 version on IE11 browser. The scripts that were designed on IE9 browser are now not working on IE11.
We have maintained all the required settings as we have done it for IE9, but still could not figure out the issue.
Could you please help us in this regard.
Thank You!!
Regards,
Swetha
I am using UFT 12.1 and having trouble recording certain objects like web buttons, web edit gets recorded fine.
I am able to play the scripts with web buttons recorded with no issues, it is just the recording of web buttons that is not working.
Any help is greatly appreciated.
Thanks,
Alka
Hi Ankur,
could you please let me know if there is any add on like Dojo for handling events like
List : After clicking on the select box downward arrow after 2 secs required data pops up and we need to select any one.
this is not handled by regular select method
Thanks,
Harish
Hi
I am running a batch run on a .net based application.In the batch some tests are running good where as some tests are getting failed since UFT is getting failed in identifying the objects.Every time differet tests are getting failed.
The same tests are running good in a different machine which has the same features of the machine where tests are getting failed.Really an awkard scenario !!
The above points mentioned in identifying the objects are all set in my machine but still i dont know the reason of the UFT getting failed to identify the object .
kindly find my details of software i am using with its versions
UFT version – 11.53
I.E version – 9.0.8112.16421
Hi Ankur,
Thanks for your information but I’m not able to Record the Firfox and Chrome in UFT 12.01 even not able to view the option select the option fire fox in the browser selection drop down
Ankur you are AWESOME! very very very useful 17 things.
Thanks Ankur! which are mentioned above are very useful.
My uft v.11.5 (+ patches 22, 56) does not want to record on ie, started as an Administrator. IE started normally is recorded. Ie is version 8
What can I do about it?
Thank you very much for the quick answer!
In Record Settings, everything is set as Record for any browser
@Anna: Please have the points on BHO manager, UAC control above.
Hi Ankur sir i M QTP BEGINNER,I WATCHED YOUR THREE VIDEO ONLY AT YOUTUBE BUT I WANT TO COLLECT FULL CLASSES VIDEO .WHAT I HAVE TO DO .IF IT IS POSSIBLE THEN SEND ME @MY MAIL ID .THAT IS VERY GOOD.PLZZZZZZZ PLZZZZZZZZZ
Hi,
I am trying to navigate to a page by following method:
Browser(“BrowserHome”).Navigate javascript:doMenuClick(‘../Pages/GLQuickCharge.aspx?IsInternational=1’);”
however every time it enters the link in the address bar,an extension is prefixed to this path,ending up in error.
Please suggest
thanks.
I forgot to mention that, I am using Chrome v30 and UFT 12 on windows 7.
@Pushkar: Please have a look on this article.
I previously used UFT 10, now in my new organization I have been given the task to evaluate the UFT 12, i have been been able to successfully create demo scripts for most of the functions (with help from your site). there are couple of things that are still bothering me.
1) can I identify DHTMLX objects in UFT 12, and if yes how? (which add-in i should use)
2) can i test a custom add-in that my organization have created for MS EXCEL, if yes how?
3) can i test a micro-strategy report / dashboard, how
Looking forward to your kind reply
@Ahmad: 1. Did you try normal web-addin? for rest , we would need more detail. Please ask a detailed question on our forums.
Hi,
I’m getting a HTTP Server error 500 when attempting to test an operation in UFT 11.5. The operation runs fine when tested from the Dev environment through other sources. What could be the reason?
Cheers
well…I’m attempting to test Web services and get that error when calling an operation/function
I have installed UFTv12 in Windows 7 64-bit (Service Pack1) machine. But it is not identifying objects in browsers: firefox version 18, 25 and Chrome version 24. The browser extensions are all enabled. The objects are getting identified in IE version 8. Am i missing something? Do I need to install patches?
@Soumen: Please disable all other extensions/add-ons on the browser and check.
Good Article
Hi Ankur,
I am sure Object Identification is not completely addressed in considering some of the third party controls. For example, in one of our windows applications, TD.SandBar.PopupMenu is used (this is a sort of container which holds the menu names as menuName1,menuName2,…etc). Now my problem is QTP does not recognize this as a control having menunames and so I cannot able to retrieve the menu name in this control using either Native properties or Identification properties.
(my problem is not just finding menu names on click. its about clicking any desired menu item inside the SandBar popupmenu control. So that if any error is thrown on form load then have to report the clicked menu along with its module details. Its a sort of form load testing before any major release to client. In present situation i put some workarounds to click menu).
If required i ready to share the screen shots in a private conversation.
Thanks Ankur for this nice article on object identification problem.
@Kalyan: You may want to post your detailed query with screenshots at LearnQTP forums.
@All: Thanks for your kind words.
Great.. Wonderful….
Awesome Ankur…
Very handy and useful
Very useful article.
Thanks for the post Ankur,so informative.