|
本帖最后由 水易清 于 2010-11-26 17:26 编辑
Set NewObject = Description.Create
NewObject("micclass").value ="WebCheckBox"
NewObject("html tag").value="INPUT"
'NewObject("class").value = "checkBox_class"
Set NewObjects = Browser("creationtime:=0").Page("index:=0").ChildObjects(NewObject)
Numbers = NewObjects.Count
For i = 0 to NewObjects.count-1
msgbox i
wait 3
NewObjects(i).Set "ON"
Browser("creationtime:=0").Page("index:=0").Link("text:=编辑").Click
wait 1
with Browser("creationtime:=0").Window("ispopupwindow:=-1","regexpwndtitle:=酒店房间类型信息 -- 网页对话框","regexpwndclass:=Internet Explorer_TridentDlgFrame","is child window:=0","is owned window:=-1").Page("index:=1")
.WebEdit("name:=bean.unitName").Set DataTable("unitName",dtLocalSheet)
.WebEdit("name:=bean.unitSpell").Set DataTable("unitSpell",dtLocalSheet)
.WebList("name:=bean.bedType").Select DataTable("bedType",dtLocalSheet)
.WebEdit("name:=bean.area").Set DataTable("area",dtLocalSheet)
.WebList("name:=bean.inetInfo").Select DataTable("inetInfo",dtLocalSheet)
.WebList("name:=bean.breakfast").Select DataTable("breakfast",dtLocalSheet)
.WebEdit("name:=bean.maxAllow").Set DataTable("maxAllow",dtLocalSheet)
.WebEdit("name:=bean.total").Set DataTable("total",dtLocalSheet)
.WebEdit("name:=bean.refPrice").Set DataTable("refPrice",dtLocalSheet)
.WebEdit("name:=bean.receptionPrice").Set DataTable("receptionPrice",dtLocalSheet)
.WebEdit("name:=bean.memo").Set DataTable("memo",dtLocalSheet)
.WebButton("name:=提交").Click
.WebButton("name:=关闭").Click
wait 3
end with
DataTable.SetNextRow
Next
循环到第二次msgbox 1后,报General run error line(10):“NewObjects(i).set "on"”. |
|