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

Review of Test Design Studio 2.0

While QTP offers greater flexibility to automate testing procedures, the IDE lacks certain professional features. A QTP license is expensive as well. Test Design...

Â

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

Windows JDK Manager (win-jdk-Manager)

ADjo LABS PROJECT : Simple and lightweight desktop utility with Interactive cmd Interface for easy view, re-point and switching between JAVA versions on windows. Demonstrating the capability...

MORE IN THIS CATEGORY

Working with JMeter Listeners

About Listeners Listeners are used for displaying test results in JMeter. Listeners allow system engineers to analyze the responses from the testing system and monetize...

Performance Testing on Firewall-Protected Networks

HP Load Runner is the most popular tool from HP for performance, load and stress testing tasks. Using the LR, you can check different...

Common Issues with HP Load Runner

HP Load Runner is a popular automated load and performance testing tool that emulates actual load to check the performance and behavior of a...

CHECKOUT TUTORIALS

Getting Started with Apache JMeter

1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing....
- Advertisement -spot_img