转载一切对自己或大家有用的东西,如有雷同,不是原创就是转载的

IE浏览器的最大最小化

上一篇 / 下一篇  2008-10-21 11:57:31 / 个人分类:QTP

'Open an IE browser with the method CreateObject()
Dim objIE, hwndIE
 Set ōbjIE = CreateObject("internetexplorer.application")
objIE.Visible = true
objIE.Navigate "http://www.google.cn" 'The parameter URL is the destination address for the IE browser

'Wait a while till the page is fully loaded
Wait(10)

'Move and resize the browser
hwndIE = objIE.HWND
'Operate the IE browser as a window object with descrīptive programming
'The window object can be uniquely identified by the parameter hwndIE, which is the window's handle of the browser
'Window ("hwnd:=" & hwndIE).Minimize
Window ("hwnd:=" & hwndIE).Maximize

'Release the object after the adjustment
Set ōbjIE = nothing

 


TAG: QTP

 

评分:0

我来说两句

Open Toolbar