????(2)????FORM??????????????

'???IE COM???IE
Set oIE=CreateObject("InternetExplorer.Application")
oIE.Visible=True '??????
oIE.Navigate http://www.baidu.com '???URL
'???IE?????????
While oIE.Busy
Wend
'???Document????
Set oDoc=oIE.Document
'???FORM???f?????wd??????????
oDoc.f.wd.value="???"
oDoc.f.su.Click
Set oDoc=Nothing
Set oIE=Nothing
(3)????Web????Script???????
'???IE COM???IE
Set oIE=CreateObject("InternetExplorer.Application")
oIE.Visible=True '??????
oIE.Navigate http://www.baidu.com '???URL
'???IE?????????
While oIE.Busy
Wend
'???Document????
Set oDoc=oIE.Document
'?????????
Set oEdit=oDoc.parentWindow.k
'?????????????
oEdit.value="???"
'???FORM???f?????su?????????
oDoc.f.su.Click
Set oDoc=Nothing
Set oIE=Nothing

????????????????????????IE??COM???HTML DOM???????IE????????????????????Щ?????????????????????????????IE????????????????????IE?????????DOM???????????????FORM???????????????????Web????Script?????????Browser???????Window???????????????????ó?????Щ?????????????????????????????????????????????????????????????????Web????????????QTP???????????????????????????????Щ??????????????????????????????????Web?????????????????????????

????4.DOM??WEB?????е????

????????дQTP?????????????????????????????????????????????????????QTP????????????????????

????????????QTP?з???DOM?????????Page??????????Page?????Object????????QTP??????????DOM????

????QTP?з???DOM??????????

????Browser("micClass:=Browser").Page("micClass:=Page").Object

?????????Object??????????IE?????DOM????????QTP?????HTML?????????????????????????????Web????????Object???????????????????????DOM?????????????????ζ???????ò???????DOM?????μ????е????????????

???????1????????????

Set oDocument=Browser("micClass:=Browser").Page("micClass:=Page").Object
oDocument.getElementByID("kw").value="???"
oDocument.getElementByID("su").Click
???2?????????????????www.baidu.com/gaoji/advanced.html
'QTP?????DOM???????HTML???
'???DOM????
Set oDocument=Browser("micClass:=Browser").Page("micClass:=Page").Object
Set allWebEdits=oDocument.getElementsByTagName("INPUT")
For each oWebEdit in allWebEdits
oWebEdit.value="???"
Next