If statement with recovery scenerio - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: If statement with recovery scenerio (/Thread-If-statement-with-recovery-scenerio) Pages:
1
2
|
RE: If statement with recovery scenerio - KVK - 10-27-2010 Hi, I have corrected the code and replaced ExitTest with Exit Do. The below code basically check if the window is displayed or not, if the window is not displayed it will close all the browsers and open the application again. Code: URL = "www.google.com" ' Enter URL of the Application You may replace this code with you existing code. If you are confused, please send your existing code. Thanks Vinod[/quote] RE: If statement with recovery scenerio - Marie - 10-28-2010 I tried putting your code in and I got a Run Error: Invalid procedure call or argument. Line 12: SystemUtil.Run "IExplorer", RFL". Code: Browser("Browser").Page("TFSMS Main").Link("TFSMS CAR Requestor").Click 'Then I have the rest of the script for if the windows do open. I am also forseeing one last issue once this is resolved. If I close all o fthe windows and start the script over I actually have a login script that runs correctly and first so once all of the windows are closed I would have to go back to the login script not just the beginning of this script. Is that possible? RE: If statement with recovery scenerio - KVK - 10-29-2010 Hi Marie, Please correct the line 12 of the above script, Code: ' Open the Browser and navigate the URL You can call the Login script / action after closing all the browsers(i.e after Line 12) or you can include the login script in a function and call the function after closing all the browsers (i.e after Line 12). Thanks Vinod |