语法写成:
Result = SQAGetProperty("Caption=PICC P&C新一代综合业务处理系统 - Microsoft Internet Explorer;\;Type=HTMLFrame;HTMLId=fraInterface;HTMLTitle=查询条件页面;\;Type=EditBox;Name=CertiNo", "innertext", str1)
我看你只是将最后两句注释了。要么你就全部注释掉,要么你把中间的几句注释掉,留下第一句和最后一句。因为Brower之类的语句可能会让你定位不准确,这样它就无法读到控件,也就是1003的错误。作者: MengLing 时间: 2004-9-29 21:01
不能注释掉,一注释掉的话连回放都有问题了。完整的脚本如下:
Sub Main
Dim Result As Integer
dim str1 as string
'Initially Recorded: 2004-9-29 21:00:24
'Script Name: qaabh
Window SetContext, "Caption=PICC P&C新一代综合业务处理系统 - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=fraInterface",""
Browser NewPage,"HTMLTitle=查询条件页面",""
EditBox Click, "Type=EditBox;Name=CertiNo", "Coords=32,5"
InputKeys "1234{TAB}"
Result = EditBoxVP (CompareProperties, "Type=EditBox;Name=CertiNo", "VP=Object Properties")
Result = SQAGetProperty("Caption=PICC P&C新一代综合业务处理系统 - Microsoft Internet Explorer;\;Type=HTMLFrame;HTMLId=fraInterface;HTMLTitle=查询条件页面;\;Type=EditBox;Name=CertiNo", "innertext", str1)
msgbox(str1)
End Sub
可是str1老取不到1234作者: 司空公子 时间: 2004-9-30 00:44
在Result=SQAGetProperty 前加上
Window SetTestContext, "Caption=PICC P&C新一代综合业务处理系统 - Microsoft Internet Explorer", ""
Window ResetTestContext, "", ""