Thursday, July 24, 2014

UFT/QTP does not identify an Object

Here are some things to Try when UFT is not recognising objects

1. Open QTP/UFT first

While testing on any app, make sure QTP is opened first and then your application. QTP works by looking into your application. If you open QTP after your application has started there are chances that QTP may not be able to identify objects

2. Load Relavant Add-ins

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

3. 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.

4. BHO (Browser Helper Object
) Manager
Make sure BHO Manager in IE under Tools > Manage Add-Ons > Enable or Disable Addons is enabled.

5. 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.

6. Disable Protected Mode

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

7. User Account Control

UAC was introduced in Windows Vista and continued in Win 7 and Win 8/8.1. UAC can interfere with your application. It is a good idea to disable it while working on QTP.
  • To turn-off UAC in Windows 7, go to Start Menu > Search for “Change User Account Settings” > Disable UAC
  • To turn-off UAC in 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 toHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\SystemFind the key: EbableLUA and change the Value Data value to 0
8. 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.)

9. 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.

10. Low Level Recording (click here for different recording modes in QTP)
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.

11. If your QTP worked well for some days or months and suddenly stopped identifying objects, that has happened probably there is some change in your browser or UFT software itself. Try to disable auto-updates on machines where QTP is installed.

12. 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).

13. 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.

14. Make sure the version of QTP you use supports the version of your browser and/or your Windows operating system.

Also read, How to handle dynamically changing objects in UFT?

1 comment:

  1. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post,thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic


Please leave your comment here...