QTP hangs on handling error window - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: QTP hangs on handling error window (/Thread-QTP-hangs-on-handling-error-window) |
QTP hangs on handling error window - dtamilarasan - 06-04-2013 My Requirement: When i click on a button in a dialog box, a window should come where as i need to click on OK button. Below is the code ********************************** Code: JavaWindow("My Teamcenter - Teamcenter").JavaWindow("My Teamcenter_Newdesign").JavaDialog("Remote Export Options").JavaTab("JTabbedPane").Select "Advanced" '********************** In the above code, when I click on "<<" button, QTP gets hanged. If I handle that error window manually, the issue not happening. Please advise how to handle this RE: QTP hangs on handling error window - basanth27 - 06-04-2013 Do not use the For Loop. Instead use the below code per the instructions i have written below, Code: Set fso = CreateObject("WScript.Shell") 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" |