0 Shares 2922 Views 13 Comments

UFT : Workarounds for some Common Issues

Aug 14, 2013
2922 Views 13

 

In this post, I am listing some of the common problems and its solution which might occur in test automation using UFT. These Solutions are in the form of workaround, and solves the purpose almost completely. So here we go.

UFT crashes after seat license installation

UFTCrash

With the release of UFT Service Pack 11.51, there was an issue occur when seat license is installed.  If you are getting your UFT crashed as soon as you start it after successful installation of the seat license, remove the Rainbow folder under below path in registry

on 64 bit :

 

on 32 bit :

 


UFTCrashRegEdit64

 

 Not able to add more than 10 Tests to solution

If you are trying to add more than 10 tests or business components into a solution in UFT and you are getting the error as below

SolutionMaxLimitMsg

To add more than 10 items to the solution:
  1. Edit the <%appdata%>/local/uft/uftproperties.xml file.
  2. Modify maximum tests in solution property to the required number:<MaximumTestsInSolution value="10" />

This may take a bit longer time to open the solution and impact memory consumption.

Object Spy Performance

If you are experiencing decreased performance of object spy, like loading time, UFT gets hang frequently especially when dealing with object intensive pages or working with many add-ins loaded. This can be due to the enhanced object spy features, which when disabled can solve this issue.

Add the registry entry below to disable the advanced features of Object Spy.

 

Heavy Log files

In case your log file created by UFT becomes very large somehow, and you want to avoid this then there is one option to disable the default logging. Here is how to do this.
Go to the UFT installation folder
modify the config file <UFT Installation>\bin\UFT.exe.config, and change this section below at the bottom of the file to:

 

Unspecified error when clicking an object in Windows 8

When working on a Windows 8 machine, using the .Click method on a Standard Windows object (such as WinButton or WinEdit) from an InstallShield Dialog window, UFT fails to run the step and generates an error: "Unspecified error". This is because, In Windows 8, UFT cannot record over applications that have a higher integrity level, such as setup programs or programs that are run as administrator.

In order to make this work, run UFT as administrator:

1. Right-click on the UFT icon or executable
2. Select the "Run as administrator" option

To use this option for all users:

1. Right-click on the UFT icon or executable
2. Select "Properties"
3. Click the Compatibility Tab
4. Check the Privilege Level checkbox “Run this program as an Administrator”
5. Click the "Change settings for all users"
6. Click Apply > OK

 

If you know a workaround for an issue with QTP or UFT, Please do share with all of us. You can do so by commenting at the section below.

You may be interested

Setting up Web Service Automation Project
Katalon Studio
240 views
Katalon Studio
240 views

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

Setting up Mobile Automation Project in MacOS
Katalon Studio
241 views1
Katalon Studio
241 views1

Setting up Mobile Automation Project in MacOS

Saket - Oct 09, 2017

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators. This tutorial explains how…

UFT Jenkins Integration
Unified Functional Testing
795 views
Unified Functional Testing
795 views

UFT Jenkins Integration

Saket - Oct 03, 2017

In our earlier post, we got to know the easy integration of UFT with GIT. This post focuses on integration of UFT and Jenkins. I have also…

13 Comments

    • Hi Malini,
      One option would be to use “ShellExecute” Method.

      Code snippet would be in your vbs file as below (assuming you are writing your script in vbs to launch QTP/UFT)
      Set objShell = CreateObject("Shell.Application")
      objShell.ShellExecute "your QTP/UFT Exe Path", "", "", "runas", 1

      Here is more info about ShellExecute Method
      ShellExecute method is used to run a script or application in the Windows Shell.
      Syntax
      .ShellExecute "application", "parameters", "dir", "verb", window
      Key
      application The file to execute (required)
      parameters Arguments for the executable
      dir Working directory
      verb The operation to execute (runas/open/edit/print)
      window View mode application window (normal=1, hide=0)

      runas verb is undocumented and for elevated mode/admin mode the value should be 1

      Hope this is useful, let me know if you find any issue.

      Reply
  1. hi Saket, I have any Issue, I want to open application using admin rights in qtp .how to open application as admin/

    Reply
    • Hi Archana,
      try this
      SystemUtil.Run "CMD", "/k runas /profile /user:\administrator "
      Window( "object class:=ConsoleWindowClass" ).Type "" 'admin password
      Window( "object class:=ConsoleWindowClass" ).Type micReturn

      Reply
  2. HI Saket

    I am facing an issue while running long Scripts (3-4 hrs) from HP ALM.

    The automator runner shows the status as passed but ALM does not update the status of the test case in test lab.The status is set to Not completed.

    Can you please help in this issue.

    Reply
  3. Hi Saket,

    Thank you for these helpful work arrounds,
    Please I did not find in my machine the uftproperties.xml file or any file where I can modify the number of tests per solution, what should I do ?

    another problem: when running a test on UFT, many instances of EXcel and Iexplore are created, any advice please ?

    Many thanks

    Reply
    • Hi rh,
      Sorry for late response on this.
      Uftproperties file must be there in appdata folder. Please make sure to check at the correct location.usually the location would be
      C:\users\appdata\local\hp\uft

      For your 2nd question: please check record and run settings..If you have set ie and excel to open when run begins. Check in web and windows application tab. Also make sure you don’t have any such statement in your debug window.

      Reply
  4. Hi Saket,

    am working on OBIEE application through QTP. I have created script to navigate through multiple reports. Script throws an unspecified error while accessing report name. sometime it works correctly, sometime throws an error. I have set up Dcomcnfg setting and also running QTP as administrator, still getting an error. Please provide me solution ? Find below code :
    For PIndex = 2 To Ubound(segment)
    RRow = Browser(“Oracle Business Intelligence”).Page(“Oracle Business Intelligence”).WebTable(“Report List Table”).GetRowWithCellText(Trim(segment(PIndex)),1,1)
    Set RunReportLink = Browser(“Oracle Business Intelligence”).Page(“Oracle Business Intelligence”).WebTable(“Report List Table”).ChildItem(RRow,1,”Link”,0)
    RunReportLink.click

    Reply
  5. Hi Saket,
    I am working on API(REST Services) automation using UFT, where my requirement is, i need to pass one parameter as QUERY parameter. i am not able to do that using UFT.I am passing the data to each parameter using excel data.if you know how to automate this using UFT API Automation then your quick response is appreciated.

    Reply
    • Hi Kedar,
      it will be easy to help if you can elaborate a bit. what you have tried and if you are getting any error or where exactly you are facing challenge.

      Thanks,

      Reply
  6. hi, i am trying to integrate jenkins and uft 14. i want to change the setting om error>display popup to on error>stop run. as the execution gets stuck if there is any error in one of the tests also. Any idea how to implement it for all tests without having to manually set it for all tests.

    Reply
    • One approach which immidiately comes in my mind is to create a batch file to launch UFT and and run your test. as soon as you launch UFT you can change the settings. This way you will not have to change this settings in each of your tests.

      Dim App 'As Application
      Set App = CreateObject("QuickTest.Application")
      App.Launch
      App.Visible = True
      App.Test.Settings.Run.OnError = "NextStep"

      In Jenkins config you should Choose ” Execute Windows Batch Command” in Build Step

      Let me know if this helps

      Reply

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...