xingfuzhu1020 发表于 2006-7-27 18:52:43

SQAGetProperty得到的值,报1003错误

Sub Main
    Dim Result As Integer
    Dim varStr as String
   
   
    Window SetContext, "Caption=Login - Microsoft Internet Explorer", ""
    Browser NewPage,"HTMLTitle=Login",""
    EditBox Click, "Name=tbEmail", "Coords=43,16"
    InputKeys "sen{TAB}sen{ENTER}"
    Browser NewPage,"HTMLTitle=Commerce Plus",""
    HTMLLink Click, "HTMLId=HyperLink24", ""
    Browser NewPage,"HTMLTitle=FindVendor",""
    HTMLLink Click, "HTMLId=HyperLink1", ""
    Browser NewPage,"HTMLTitle=VendorList",""
    HTMLLink Click, "HTMLId=HyperLink1", ""
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=2", ""
   
   '想实现的功能:插入验证点后,在SQAGetProperty函数里取得varStr的值并显示出来
    Window SetTestContext, "Caption=VendorRequests - Microsoft Internet Explorer", ""
    Result=SQAGetProperty("Caption=VendorRequests - Microsoft Internet Explorer;\;HTMLTitle=VendorRequests;\;HTMLId=Hyperlink2","innerText",varStr)
    msgbox varStr
   
    Window SetContext, "Caption=VendorRequests - Microsoft Internet Explorer", ""
    HTML Click, "HTMLId=Form1", "Coords=608,68"
    HTMLLink Click, "HTMLId=Hyperlink2", ""
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=2", ""

End Sub

[ 本帖最后由 xingfuzhu1020 于 2006-7-27 19:36 编辑 ]

jinrk 发表于 2006-7-28 13:04:12

多看帮助,1003是没找到对象

ilovejolly 发表于 2006-7-28 14:35:28

用"SQAGetProperty 1003" 搜索本论坛
页: [1]
查看完整版本: SQAGetProperty得到的值,报1003错误