Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP hangs on handling error window
#2
Solved: 10 Years, 9 Months ago
Do not use the For Loop. Instead use the below code per the instructions i have written below,
Code:
Set fso = CreateObject("WScript.Shell")
While fso.AppActivate("Your Window Name") = FALSE
wscript.sleep 1000
Wend
fso.SendKeys "a", True

fso.SendKeys "N", True

wscript.sleep 7000

While fso.AppActivate ("Your Window Name") = FALSE
wscript.sleep 1000
Wend

fso.SendKeys "N", True

How to use:
1. Save the above code as dialoghandler.vbs on your c:\ drive.
2. Be sure to modify the code to replace the window title or name.
3. Replace the appropriate keystrokes you need to send for the dialog. [ for eg :you may need to press "Enter" which inturn actually clicks on "OK" or "cancel" button.
4. Just before the line on QTP where the code executes and freezes QTP, enter this code,
SystemUtil.Run "C:\Windows\System32\Wscript.exe", "C:\dialoghandler.vbs"
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Messages In This Thread
RE: QTP hangs on handling error window - by basanth27 - 06-04-2013, 02:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between error handling and exception handling venkatbatchu 6 25,739 12-11-2018, 05:11 PM
Last Post: smitapawar610
  Fireevent ondblclick hangs QTP until window is closed Andor 2 1,860 06-01-2015, 08:10 PM
Last Post: Andor
  UFT 12 hangs on a line (.NET forms) sara- 0 2,410 10-22-2014, 03:51 PM
Last Post: sara-
  QTP hangs Girish S 0 1,773 03-03-2014, 01:13 PM
Last Post: Girish S
  QTP hangs when application error Windows displays rj_hogan 0 2,639 11-07-2011, 04:01 PM
Last Post: rj_hogan

Forum Jump:


Users browsing this thread: 1 Guest(s)