Monday, 18 July 2011

How to maximize or minimize the Windows using QTP? Or Syntax for Maximize Window


‘Method 1- Using SystemUtil

SystemUtil.Run "iexplore.exe","www.google.com",,,3

‘Here
0-      For close window
2-      For minimize window
3-      For Maximize window

‘Method 2 using Windows Handle property

Dim ie
Set ie=CreateObject ("InternetExplorer.Application")
ie.visible=True
Window("hwnd:=" &ie.HWND).Maximize
ie.navigate "www.google.com"

‘Method 3 – Using Shall Scripts 

Dim wsh
Set wsh = CreateObject("WScript.Shell")
wsh.Run "iexplore.exe www.google.com",3 , False
Set wsh = Nothing

No comments:

Post a Comment