Sunday, June 13, 2010

Maximize the Browser using QTP

Option Explicit

Dim IE, hWnd
Set IE=createobject("Internetexplorer.application")
IE.Navigate2 ""

'********* The below line gives you the handle window property for browser ************ But it will not work to make the browser maximize
msgbox Browser("micclass:=Browser").GetROProperty("hwnd")

' ********* The below line give you the handle window property for window ************ which will be used to make the browser window maximize
msgbox hWnd

Window("hwnd:=" & hWnd).Maximize

No comments: