岁月沧桑,物是人非,岁月赋予了我什么:财富?知识?皱纹?生活态度?
给不可编辑的控件赋值
上一篇 /
下一篇 2012-08-29 17:06:56
/ 个人分类:自动化测试
解决方法:修改目标编辑框的属性为readOnly=false,然后再执行set操作
qtp脚本实例:
Function common_set_readonlyedit(obj_input,mes_input)
Set bj=obj_input.Object
old_set=obj.readOnly
if old_set=true then
obj.readOnly=false
obj_input.set mes_input
obj.readOnly=old_set
else
obj_input.set mes_input
end if
End Function
ruby脚本实例:
def common_set_readonlyedit(obj,mes_input)
old_set=obj.readOnly
if old_set==true
obj.readOnly=false
obj.value=mes_input
obj.readOnly=old_set
else
obj.value=mes_input
end
end
收藏
举报
TAG: