Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
closing browser at end
#2
Solved: 11 Years, 8 Months, 1 Week ago
Well, thats the caveat when you have the tool take over the control. Ideally, when you stop an execution it should be controlled via the code, but nevertheless, QTP has the option so why not use it. However, it ends up like you can either have the egg or the chicken Smile

Now since it is controlled by QTP and you cannot insert a code after the error occurs, the easiest would be to,
"Look for any open browsers and if they exist close them before a test execution Starts".

However, this would be a very primitive and not a best practice suggestion. The best way to do this is to handle errors in the code using the On Error Resume Next and then capturing those errors using Err.Number and logging them. This way you will have un-interrupted execution as well you know specifically the ones which failed.
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
closing browser at end - by bistritapcv - 04-11-2013, 04:23 AM
RE: closing browser at end - by basanth27 - 04-11-2013, 06:54 AM
RE: closing browser at end - by bistritapcv - 04-11-2013, 08:03 PM
RE: closing browser at end - by basanth27 - 04-12-2013, 07:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,700 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
  Expected End statement error Lavanya N 2 5,370 07-27-2015, 01:52 PM
Last Post: Lavanya N
  recovery scenario for closing a message box itself ashima 0 2,321 12-26-2013, 11:10 AM
Last Post: ashima
  error object disabled on line 9 where it says " Browser("Browser").CloseAllTabs" kp_usa 1 3,494 12-20-2012, 12:20 AM
Last Post: adityapant27
  closing the browser diya 3 3,843 11-27-2012, 10:14 PM
Last Post: diya

Forum Jump:


Users browsing this thread: