自定义对象无法进行set操作
我希望进行如下操作:在弹出的对话框中遍历所有符合属性要求的对象,并对这些遍历出来的对象写入固定的值,脚本如下:
Set all_oEdit = Description.Create
all_oEdit("class").value = "easyui-validatebox validatebox-text"
all_oEdit("micclass").value = "WebEdit"
all_oEdit("html tag").value = "INPUT"
Set all_oEdit= Browser("华讯健康云").Page("华讯健康云_2").Frame("Frame").ChildObjects(all_oEdit)
For i = 0 to all_oEdit.count - 1
Set oEdit = all_oEdit.item(i)
oEdit.set = "11111"
Next
但在执行时,qtp报错,提示为:“对象不支持此属性或方法: 'oEdit.Set'”
求各位大神指点
oEdit.set"11111"
如楼上所说:
Set MyDescrīption = Descrīption.Create()
MyDescrīption("html tag").Value = "INPUT"
MyDescrīption("type").Value = "checkbox"
Set Checkboxes = Browser("Itinerary").Page("Itinerary").ChildObjects(MyDescrīption)
NoOfChildObjs = Checkboxes.Count
For Counter=0 to NoOfChildObjs-1
Checkboxes(Counter).Set "ON"
Next
页:
[1]