51Testing软件测试论坛

标题: SQAGetProperty得到的值,报1003错误 [打印本页]

作者: xingfuzhu1020    时间: 2006-7-27 18:52
标题: 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
多看帮助,1003是没找到对象
作者: ilovejolly    时间: 2006-7-28 14:35
用"SQAGetProperty 1003" 搜索本论坛




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2