标题: childItem这个方法到底怎么用啊? [打印本页] 作者: xiatian831621 时间: 2008-6-3 18:53 标题: childItem这个方法到底怎么用啊? set wtObject=Browser("Fastcommerce").Page("Fastcommerce#").WebTable("name:=enableShipInfos","x:=40")
If Browser("title:=Fastcommerce").Page("title:=Fastcommerce#").WebTable("name:=enableShipInfos","x:=40").Exist then
msgbox "wtobject is exist"
end if
' Set wcbObject=wtObject.childItem(i,1,"WebCheckBox",0)
If wtObject.childItem(1,1,"WebCheckBox",0).exist Then//这句提示缺少对象:'wtObject.childItem(...)'
msgbox "wcbobject is exist"
End If作者: zte_boy 时间: 2008-6-3 19:52
检查下这个单元格内是否有对象,确认你的单元格没有定位错误作者: xiatian831621 时间: 2008-6-4 11:03
单元格没错,我改了一下
For i=1 to rowcounts
set wtObject=Browser("Fastcommerce").Page("Fastcommerce#").WebTable("name:=enableShipInfos","x:=40")
If Browser("title:=Fastcommerce").Page("title:=Fastcommerce#").WebTable("name:=enableShipInfos","x:=40").Exist then
msgbox "wtobject is exist"
end if
Set wcbObject=wtObject.childItem(i+1,1,"WebCheckBox",0)
If wcbObject.exist Then //这句的返回值是false msgbox 没有执行
msgbox "wcbobject is exist"
End If
wcbObject.set "OFF" ///这句报这样的错 General run error. Line (25): "wcbObject.set "OFF"".
Next作者: xiatian831621 时间: 2008-6-4 14:19
我就是想操作webtable 中的webcheckbox要怎么办呢?高手指点一下啊??作者: pxwcypx 时间: 2008-6-4 14:32
Set webchk=Browser("系统登陆").Page("KJLink CRM_3").WebTable("请选择").ChildItem(i2,1,"WebCheckBox",0)
webchk.set "ON"作者: xiatian831621 时间: 2008-6-4 15:03
这个方法我已经试过了,不行,谢谢,我选用了这个方法,问题已经解决
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set Checks = Browser("Fastcommerce").Page("Fastcommerce#").ChildObjects(oDesc)