Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maximize and Close a Browser
#3
Solved: 11 Years, 8 Months ago
This is the best way of closing Browser

Code:
Browser("Browser").Close


For Maximize
Code:
hWnd=Browser("Browser").GetROProperty("hwnd")
hWnd = Browser("hwnd:=" & hWnd).Object.hWnd
Window("hwnd:=" & hWnd).Activate
Window("hwnd:=" & hWnd).Maximize

Note: Its best practice to maximize window,
First get the handle of browser, then Activate then Maximize.

Regards,
Munna Sarfraz



Reply


Messages In This Thread
Maximize and Close a Browser - by mv8167 - 01-13-2012, 08:36 PM
RE: Maximize and Close a Browser - by vinod123 - 01-17-2012, 04:12 PM
RE: Maximize and Close a Browser - by Munna.Sarfraz - 01-17-2012, 04:54 PM
RE: Maximize and Close a Browser - by Mike B - 03-26-2023, 03:55 PM
RE: Maximize and Close a Browser - by mv8167 - 01-18-2012, 03:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Close popup ad windows dustwynn 1 3,148 10-25-2016, 05:57 PM
Last Post: Ankur
  [UFT] Close opened folder robertosalemi 1 3,513 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Close browser code not working akilamurugesh 1 4,794 08-26-2014, 03:21 PM
Last Post: vinod123
  Close on Exit Issue in QTP 11.0 EGBELL 1 3,327 02-02-2014, 03:39 PM
Last Post: EGBELL
  Unable to close new tab pradeep singh 3 9,196 03-05-2013, 09:43 AM
Last Post: pradeep singh

Forum Jump:


Users browsing this thread: