HTML DOM???????
???????????? ???????[ 2013/9/25 16:23:44 ] ????????
????(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
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11