Common Errors with QTP/UFT – Part 2

Welcome to the second and final part of this series on ‘Common Errors for QTP/UFT’! Earlier, we discussed about some of the ‘Common QTP/UFT Installation Issues’.

In this post however we shall be discussing some assorted issues which you may face, when using both QTP/UFT and ‘JAVA’ related tools and software (e.g. JDK, Eclipse IDE), on the same machine. This article also explains the possible fixes or workarounds to overcome each issue. Hope that helps!

Eclipse/QTP/UFT does not work after Java update

When a machine runs QTP and Java Applications, there are certain configuration conflicts. Users experience unexpected behaviour of QTP or Java. One of the common issues with QTP and Java is that Eclipse workspace does not load when you run the program. There are different errors that can be seen:

Case 1 : There is no error message. The program blinks for a second and goes off

One of the possible reasons is that you have downloaded Java SDK plugin from HP and environmental variables prevent Java application from loading. In that case, there should not be any issue with the Eclipse workspace. You can confirm this by changing the SHOW_WORKSPACE_SELECTION_DIALOG argument to True. This issue occurs on machines that run QTP. The reason is that QTP sets a value to environmental variables JAVA_OPTIONS AND JAVA_TOOLS_OPTIONS.

To run Eclipse, you have to delete these environmental variables. However, that gives another problem. Now, QTP doesn’t recognize Java or Oracle objects. The best way to resolve this issue is to make Java Support load only when Java add-ins or Oracle add-ins are running with QTP. Follow these steps to achieve this:

  1. Close all Java applications.
  2. Close QTP
  3. Click on Start -> Control Panel -> Java Control Panel
  4. Go to Advanced Tab -> Default Java for Browsers
  5. Uncheck the box for Internet Explorer and close the Java Control Panel
  6. Go to the Registry Editor. Start -> Run -> RegEdit
  7. Click the + beside HKEY_Local_Machine -> Software -> Mercury Interactive -> JavaAgent -> LoadDependsOnPackage
  8. Select 32-bit OS or 64-bit OS according to your configuration
  9. The default value is set to 0. Change it to 1 so that the agent will be loaded only when the application is loaded.
  10. Close the Registry Editor and restart the system
Case 2 : Error Message - NoClassDefFoundError

Another common error encountered while upgrading to QTP 11 from QTP 9.5 or QTP 10, the upgrade is successfully done. However, when you open the application, it does not open or behaves unexpectedly. This is commonly seen with systems that use local versions of the HP software.

When you open Eclipse, it gives an error NoClassDefFoundError. This issue might be a result of corrupt Java (JDE/JRE) software. When you run the Eclipse archive on another system, it should work fine.

To resolve this issue, uninstall the Java program suite and the QTP software. Then, freshly install Java and then install QTP. When QTP is installed on a machine that has a proper Java environment, it should work fine.

Case 3 : Error message - “An error has occurred. See the log file”

Consider an instance wherein you open the Eclipse and it gives an error message to check the log file. This is again caused by Java update. Check if you have installed JRE updates recently. Sometimes, you might install two versions of JRE and a conflict arises.

To resolve this issue, uninstall Java environment and Eclipse and reinstall them again.

Case 4: QTP behaves unexpectedly

In certain cases, QTP behaves unexpectedly and you experience the following issues:

  • QTP does not recognize the window and no recording is done
  • Missing toolbars or tabs
  • Coding error

The simplest way is to restart your machine and check if the issue is resolved. If that does not work try the following :

  • Check if all add-ins are selected.
  • Corrupt user profiles can prevent the program from working in its fullness.
  • Check out if your user profile is intact. To do so, create another user account and login into the program to see if the issue is resolved.
  • Another area to check out is whether you are logged in as an administrator. QTP requires an administrator account for certain tasks.
  • Reinstalling the software should be the last resort. Before doing that, check if there are any QTP patches released for the issue you are experiencing.
Tushar Sharma
Tushar Sharmahttps://www.automationdojos.com
Hi! This is Tushar, the author of 'Automation Dojos'. A passionate IT professional with a big appetite for learning, I enjoy technical content creation and curation. Hope you are having a good time! Don't forget to subscribe and stay in touch. Wishing you happy learning!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

RELATED POSTS

Common Errors with QTP/UFT – Part 1

As the name suggests, this article focuses on the common problems faced during or after QTP/UFT installation. We shall also have a separate article...

Traditional Framework Definitions (QTP)

Over the years Functional Test Automation has come a long way from WinRunner to QTP and until ALM. The tools have evolved to a...

Automation Tools Comparison (SilkTest vs QTP vs Selenium)

While manual testing and automated testing go hand in hand, one of the important benefits of automated testing is the assurance that the software...

Â

RECENT 'HOW-TO'

How To Install Oh-My-Posh On Windows PowerShell

Oh-My-Posh is a powerful custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable. It does not...

SIMILAR ON CODEX

FEATURED PROJECTS

SEPA Bulk File Generator and Validator

ADjo LABS PROJECT: SEPA Bulk File Generator and Validator. Supported File Types PAIN008, PAIN001, PACS003 and PACS008. Tested for supporting PAIN.008.001.001 and PAIN.008.001.002 (version 1&2). The XML...

MORE IN THIS CATEGORY

Getting Started with Selenium WebDriver

Table of Contents 1. Selenium and Selenium Web Driver 2. Setting-Up the Environment 3. Test Script with Selenium Web Driver 3.1) Creating a project 3.2) Creating...

How To Use TestNG with Selenium

1. What is TestNG? TestNG is an open-source automated testing framework with flexible and powerful features. It is inspired by JUnit and NUnit but with...

Automation Tools Comparison (SilkTest vs QTP vs Selenium)

While manual testing and automated testing go hand in hand, one of the important benefits of automated testing is the assurance that the software...

CHECKOUT TUTORIALS

Working with Selenium WebElements

Table of Contents 1. Selenium WebElements 2. WebElement Locators 3. Working With Text Box 4. Working With Buttons 5. Checkboxes and Radio Buttons 6....
- Advertisement -spot_img