Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to Close UFT 14.53 through AOM Object
#1
Solved: 4 Years, 4 Months ago
Hi,

I am using UFT 14.53 Version.

we created AOM Object to launch uft tool and for test execution, and after completion of test execution uft tool needs to closed and start next iteration in the loop.

But after completion of test execution, UFT tool is not closing and UFT is throwing error as 'The operation failed because application is waiting for user input' and with error code 800A03F4

Below is the code for reference:

 Dim App, qtTest, DriverPath
 
 DriverPath = "E:\Automation\Chrome"
 intIterationCnt = 3
 intTestCnt = CInt(InputBox("Please enter the no. of test cases in the Execution Excel Sheet"))
 'intTest = intTestCnt - (intTestCnt Mod 5)
 intCnt = intTestCnt/intIterationCnt


 If InStr(intCnt,".") <> 0 Then
  intCnt = intCnt + 1
 End If

 intTest = Cint(Split(intCnt,".")(0))
 
 Redim QTP_Tests(intTest)

 For ctr = 1 To intTest

  QTP_Tests(ctr) = DriverPath & "\AllModulesExecution\Scripts\DriverScript\CompleteModulesExecution_DriverScript"
  If ctr = intTest Then
   Exit For
  End If
  lb = (ctr*intIterationCnt - intIterationCnt)+1
  ub = ctr*intIterationCnt

  For i = lb to ub
   Set App = CreateObject("QuickTest.Application")
   App.Launch
   App.Visible = True
   'Set QuickTest run options
   App.Options.Run.ImageCaptureForTestResults = "Always"
   App.Options.Run.RunMode = "Normal"
   App.Options.Run.StepExecutionDelay = 0
   App.Options.Run.ViewResults = False
   App.Options.Run.AutoExportReportConfig.AutoExportResults = True
   App.Options.Run.AutoExportReportConfig.StepDetailsReport = True
   App.Options.Run.AutoExportReportConfig.DataTableReport = False
   App.Options.Run.AutoExportReportConfig.LogTrackingReport = False
   App.Options.Run.AutoExportReportConfig.ScreenRecorderReport = True
   App.Options.Run.AutoExportReportConfig.SystemMonitorReport = False
   App.Options.Run.AutoExportReportConfig.ExportLocation = DriverPath & "\AllModulesExecution\Result\TestExecutionResult"
   App.Options.Run.AutoExportReportConfig.UserDefinedXSL = ""
   App.Options.Run.AutoExportReportConfig.StepDetailsReportType = "PDF"
   App.Options.Run.AutoExportReportConfig.StepDetailsReportFormat = "Detailed"
   App.Options.Run.AutoExportReportConfig.ExportForFailedRunsOnly = True
   wscript.sleep 1000
   App.Open QTP_Tests(ctr),True  ' Open the test in read-only mode
   Set qtTest = App.Test
   qtTest.Settings.Run.OnError = "NextStep"
   qtTest.Run ' Run the test
   qtTest.close
   wscript.sleep 1000
   App.Quit
   Set qtTest = Nothing
   Set App = Nothing
   wscript.sleep 1000
  Next
 Next


Attached Files Image(s)
   
Reply
#2
Solved: 4 Years, 4 Months ago
The above issue got resolved on replacing 'qtTest.close ' with below mention code.

Dim shell
Set shell= CreateObject("WScript.Shell")
shell.Run "taskkill /f /im uft.exe", , True
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using UFT 14.0 on Win 10, unable to find 'Register New Browser Control' utility soujanya 2 2,931 04-23-2018, 07:24 PM
Last Post: soujanya
  UFT 14.0 is unable to Identify Oracle forms. krr 0 3,391 06-12-2017, 06:24 PM
Last Post: krr
  Unable to identify Child Object for a window application created using C#. ssanjeev 3 5,900 03-27-2017, 05:38 AM
Last Post: ankita
  UFT not recognizing windows object sbudhwa 0 2,541 10-05-2016, 09:32 PM
Last Post: sbudhwa
  Comparing data from xml file and a value in gui object using UFT Lavanya N 1 2,232 07-21-2015, 03:24 PM
Last Post: Lavanya N

Forum Jump:


Users browsing this thread: 1 Guest(s)