Troubleshooting

This topic provides troubleshooting for known issues when working with UFT Developer.

Repairing the UFT Developer installation does not work

Problem: Errors occur when I run the UFT Developer installation repair, or UFT Developer does not function properly after the repair.

Possible solution: Provide full read and write permissions to the registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Mercury Interactive\Setup\HP Lean Functional Testing.

Then, run the repair process again.

Back to top

The installation wizard does not open on CentOS

Problem: When I run the UFT Developer installation wizard, the command line installer opens instead, and an error similar to this occurs:

GUI mode is not supported : Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

Solution: Install UFT Developer from the command line, or perform the following steps to use the wizard:

  1. Quit the command-line installer

  2. In the terminal, in the folder where the installer is located, run the following command to enable access to the X Window System server: xhost +

  3. Run the UFT Developer installation wizard again

After the installation, you can disable access to the X Window System server by running: xhost -

Back to top

Java applications do not run when I launch UFT Developer

Problem: After I launch the UFT Developer runtime engine, Java applications that usually run on my computer without any problem do not run.

Solution: Manually make the following change in the c:\Windows\mercury.ini file:

  1. Add the process name of your Java application to the end of the file using the following format: <processName>.exe=0
  2. Restart the UFT Developer runtime engine.

Back to top

Fail to launch the UFT Developer runtime engine from the IDE (Windows only)

Problem: When I try to enable UFT Developer from my IDE, I get an error message that the UFT Developer runtime engine could not be launched.

Possible cause: The wmic command used by the launcher is not recognized on your machine. This is usually because wmic is not included in your machine's path.

To verify the problem cause: 

  1. From the bin folder in your UFT Developer installation folder, open a command line window.
  2. Run the command: leanft.bat start

The following error message confirms that the cause of the failure is the unrecognized wmic command.

failed to get list of processes. err: Error: Command failed: wmic process where "name='node.exe'" get ProcessId,CommandLine /Format:list
'wmic' is not recognized as an internal or external command, operable program or batch file

Solution:

  1. Edit your system PATH environment variable and add to it the path of the wmic command.

    Tip: The path to add is usually %SystemRoot%\System32\Wbem;

  2. Test this fix by typing wmic in a new command line window. This should open the wmi command line interface, which prompts with: wmic:root\cli>

  3. Enable UFT Developer from your IDE.

Back to top

Runtime: Test gets stuck after browser opens

Problem: When running a test, the test gets stuck after the browser opens, before navigation.

Solution: If you have a proxy set up, make sure it is not localhost or 127.0.0.1.

Back to top

Runtime: GetTextLocation or GetVisibleText methods fail

Problem: When running a test, GetTextLocation or GetVisibleText methods fail.

Solution: Make sure that you included the ABBYY OCR Engine in the UFT Developer installation. For details, see Install UFT Developer for Windows.

Back to top

UFT Developer plugin is not working in my IDE

Problem: I see the UFT Developer menu in my IDE but its options are disabled and I can't enable it.

Solution: If your IDE is configured to use a proxy server, make sure that the proxy bypass is enabled for localhost.

Back to top

Eclipse: UFT Developer plugin is not working in Eclipse

Back to top

Eclipse: "View Last Run Results" is disabled in the UFT Developer menu after running a test

Problem: I get the following error in my Eclipse console output:

java.io.IOException: Cannot run program "wmic": CreateProcess error=2, The system cannot find the file specified

Solution: Make sure that you have the Java JRE/JDK path configured in your PATH environment variable. The path should point to the location of java.exe.

Example: C:\Program Files (x86)\Java\jre1.8.0_91\bin

Back to top

Web is not recognized on Google Chrome

Possible cause: For UFT Developer to work in Google Chrome, the OpenText UFT Agent extension needs to be installed. If UFT Developer was installed before Google Chrome was installed, the browser extension is missing.

UFT Developer 2023 and earlier: The extension is named Micro Focus UFT Agent.

Solution:

  1. Manually install the browser extension, as described in Set up Google Chrome for UFT Developer.

    After the OpenText UFT Agent extension is installed, it is displayed in the Chrome Extensions list.

  2. Restart the computer.

  3. Restart the UFT Developer runtime engine.

Back to top

UFT Developer is not recognizing the objects in my application

Problem: UFT Developer is not recognizing the objects in my application. What should I do?

Solutions:

  • If you are testing Web objects, make sure you have followed the instructions for setting up your web browsers to work with UFT Developer and that you open the web browser after the UFT Developer runtime engine is active. For details, see Set up web browsers and controls.
  • Make sure your application was developed with a supported technology and version. For details, see the Support Matrix.
  • If you need to test specific objects that are not supported out of the box, create Insight test objects to enable UFT Developer to access your objects via image-based recognition. For details, see Insight image-based identification (Windows only).
  • To support WebAgGrid or WebUIGrid test objects, you must specifically load the AgGrid or UIGrid Web child add-in in addition to the Web add-in.

Back to top

Object Identification Center (OIC) not identifying browser (design)

Problem: During design time, the OIC is not able to identify my browser.

Solution: If you have a proxy set up, make sure it is not localhost or 127.0.0.1.

Back to top

Object Identification Center (OIC): Can't add objects to an application model

Problem: The OIC recognizes the objects in my application, but I cannot save objects from the OIC to an application model.

Possible cause: The Internet browser is set to use a proxy that blocks all connections. This is unnecessarily blocking local connections as well.

Solution: Configure the Internet Options to allow local connections:

  • In Local Area Network settings, select Bypass proxy server for local addresses.
  • In the advance proxy settings, enter the following addresses in the Exceptions list under Do not use proxy server for addresses beginning with: localhost;127.0.0.1

Back to top

Object Identification Center (OIC) not recognizing objects

Back to top

Object Identification Center (OIC) in Eclipse not working after UFT Developer upgrade

Problem: I just upgraded UFT Developer. Now when I open the OIC in Eclipse, it flashes open but then disappears. I tried to invoke the OIC from command line, but the same thing happens. The log tells me that "C:\Program" failed to run.

Back to top

Cannot open some UFT Developer dialog boxes on Linux

Problem: Opening the following dialog boxes from the UFT Developer menu in the IDE does not work on Linux: The Settings dialog box, the OIC, the Test Recorder, and the Digital Lab.

Opening these dialog boxes from the Windows Start menu or the system tray results in an error similar to this: 

./bin/leanft/UFT Developer: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

Possible cause: To work with UFT Developer dialog boxes on Linux, the libXss library must be installed on your machine.

Solution: Install the libXss library by running the following command: # yum install libXScrnSaver

Back to top

Cannot open the OIC or Test Recorder on Linux

Problem: On Linux, the OIC and Test Recorder do not start when you try to open them from the Eclipse UFT Developer menu or from a command line.

Possible solution: To open the OIC or Test Recorder, make sure you are using a non-root user.

Back to top

Application model in Visual Studio is showing a blank screen

In Visual Studio, the Application model window suddenly goes blank.

Solution:

  1. Open PackagePreferences.json, located in %appdata%\LeanFT\Preferences.
  2. Locate the EnableAppModelLargeAddressSpace parameter, and change the value from false to true.

    It should look as follows:

    "EnableAppModelLargeAddressSpace": true

Back to top

Eclipse/IntelliJ IDEA IDE error: "A class file was not written..."

After adding an object to your application model, you may encounter this error when saving the application model (Eclipse) or building the project (IntelliJ IDEA).

This is caused by adding an object with an exceedingly long name to the application model.

Change the new object's code name so it does not exceed 210 characters and try again.

Back to top

Report not building after running test

Problem: The report is not being generated after the test runs

Solution: Make sure you have write permissions to the report output folder. The location may be specified in a LEANFT_REPORTS_TARGETDIR environment variable, in the test's App.config or leanft.properties file, or inside your test using the ReportConfiguration methods.

Back to top

Mobile: Device logs not showing up in run results report

Problem: I ran a test on a mobile device, but I don't see the device log in the HTML report.

Solution: To see device logs in the HTML report, you must include a Launch or Restart method to ensure that app opens on the device. For details, see Create mobile tests.

Back to top

Test runs only from IDE. Otherwise I get 'Object not found' failure

On some operating systems, a test that can run from the IDE, fails to run independently.

Possible solutions: 

  • Turn of UAC.
  • Run the test as an administrator.

Back to top

ALM: "LEANFT-TEST" missing in test types

Problem: When I create a new test in my ALM test plan, I don't see LEANFT-TEST in the Type list.

Possible causes:

  • The ALM patch (12.53) that supports the LeanFT test type must be installed and configured.

  • After installing the 12.53, the test types may not have been manually updated. This is necessary for the new test types to appear in the Type list of existing projects.

Solution: 

  1. Close ALM.

  2. Install and configure the ALM 12.53 patch.

  3. Log into ALM >  Site Administration and update the test types (Tools> Update Test Types). All existing active ALM projects are updated with the test type definition files that were added in the new ALM version, which include the LeanFT test type.

    For more details, see the ALM Help Center.

Back to top

ALM: Cannot run test. I get a message about Remote Agent configuration

Back to top

ALM: Cannot run a NUnit 3 test with parameters from ALM

Possible cause: You may be using the ALM data source that is meant for NUnit 2.6 tests. Instead, for NUnit 3 tests, you should be using the ALMStatic data source.

Solution: For NUnit 3 tests, use the ALMStatic data source.

For example:

[TestCaseSource("ALMStatic")]

public void Test(string param)

{

...

}

Back to top

Cannot run test cases built with UFT Developer's MSTest 2.x templates

Test cases built using UFTd MsTest 2.x template on Visual Studio 2017 are not running. Sometimes there is no output message, and sometimes a "0 tests found" message is displayed.

Possible cause: When the MSTest 2.x nuget packages are installed, a property file is imported into the project file, adding several DLLs marked Copy To Output Directory - Copy If Newer. When a project is created using the MsTest 2.x project template, Visual Studio does not copy these DLLs to the output folder during the build.

Workaround:

  1. Open the problematic MSTest 2.x project in VS2017. In a text editor, modify the .csproj file by adding an empty line at the end. Save the file, delete the empty line, and then save the file again.

  2. In the message dialog box that open in Visual Studio, select Reload all.

  3. Rebuild the project.

Back to top

UFT Developer-BPT entities are corrupted after upgrade

Possible cause: UFT Developer-BPT entities created in a previous version of ALM can become corrupted after upgrading to a version of ALM that does not support UFT Developer, and then upgrading again to another version of ALM that does support UFT Developer.

For example, if your upgrade path was: ALM 12.01 Patch 3 > ALM 12.50 > ALM 12.53, then your entities may become corrupted.

UFT Developer-BPT entities include UFT Developer components and BPT flows or tests with UFT Developer components.

Solution: Perform a repair of the ALM project with corrupted entities, as described in the ALM Administrator Help.

Back to top

UFT Developer plugin disappears after upgrading IntelliJ IDEA

Possible cause: The new version of IntelliJ IDEA was installed in a different location.

Solution: do one of the following:

Or

  • Copy the UFT Developer folder containing the plugin files into IntelliJ IDEA's plugin folder.

    The UFT Developer folder containing the plugin files: <UFT Developer installation folder>\IDE\IntelliJ\plugins\LeanFT.

    IntelliJ IDEA's plugin folder: <IntelliJ's installation folder>\plugins, for example: C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.2>\plugins

Back to top

Issues when using the UFT Developer .NET templates for .NET 5 or later

Supported on UFT Developer 23.4 or later.

 

Back to top

My old Cucumber project does not work

Problem: Cucumber projects created using LeanFT templates from versions 14.52 or earlier do not work with UFT Developer.

Solution: Perform the following steps to adjust your project to work with UFT Developer

  1. Update your LeanFtTest.java file:

    1. At the CucumberOptions annotation, change the feature parameter from: 

      features = "src/main/java/<name_of_the_package>"

      to

      features = "classpath:< name_of_the_package>"

    2. Replace com.hp.lft.report.CucumberReporter with com.hp.lft.report.CucumberReporterV1

  2. In the pom.xml file, add the following dependency:

    Adjust the version number according to the UFT Developer version you are using.

    <dependency>
    

        <groupId>com.hp.lft</groupId>

        <artifactId>cucumberv1</artifactId>

        <version>2024.2.0</version>

    </dependency>

  3. Install and deploy the new JARs in the Maven repository, including com.hp.lft.cucumberv1-2024.2.0.jar.

    Adjust the version number according to the UFT Developer version you are using.

    For UFT Developer version:  Use: 

    2021

    2021.0.0
    2021 R1 2021.1.0
    2022 2022.0.0
    2023 2023.0.0
    23.4 2023.4.0

    For details, see Prerequisites for Maven-based projects.

Back to top

See also: