Micro Focus QTP (UFT) Forums
Close browser code not working - 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: Close browser code not working (/Thread-Close-browser-code-not-working)



Close browser code not working - akilamurugesh - 08-20-2014

Hello All,

I am using the following code to close all the browsers.

Code:
While Browser("creationtime:=0").Exist(0)
'Close the browser
Browser("creationtime:=0").Close
Wend

I am getting "object is disabled" error when the line Browser("creationtime:=0").close is executed.

As a results UFT seems to go to a paused state for a while and then execution continues.

Environment:
Windows 7
UFT 11.53
IE8

Please help


RE: Close browser code not working - vinod123 - 08-26-2014

Use Browser("micclass:=Browser").Close statement to close the browser