xuefeng 发表于 2005-12-6 18:15:02

请教高手:SQAWaitForPropertyvalue 函数为何返回值是1016呢!

本人今天用robot调试脚本的时候,为何SQAWaitForPropertyvalue 函数的返回值是1016(sqatimeout)呢,源码如下 :

Sub Main
    Dim Result As Integer
    Dim Result2 As Integer
    Dim Result3 As Integer
    dim yjk as integer

    dim j as integer
   
    i=111100000009669
    'Initially Recorded: 2005-11-2814:44:08
    'Script Name: gdjh_wdfh
    for j=1 to 10000
    Window SetContext, "Name=mainform", ""
    InputKeysi & "{ENTER}"
    i=i-1
   Result = SQAWaitForPropertyvalue("Caption=提示", "Enabled",TRUE, 6000)
   
    msgbox Result
    If Result <> sqaSuccess Then
       PushButton Click, "Text=确定"
       Result2 = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 1000)
       msgbox result
       PushButton Click, "Text=确定"
      
    End if
    'delayfor(5500)
   
    'Window SetContext, "Name=mainform", ""
    'InputKeys "1{ENTER}2{ENTER}{NUM+}{NUM*}"
    Window SetContext, "Name=mainform", ""
    InputKeys "1{ENTER}"
   
    Window SetContext, "Name=mainform", ""
    InputKeys "2{ENTER}"
      
    Window SetContext, "Name=mainform", ""
    InputKeys "{NUM+}"
   

   
   Window SetTestContext, "Caption=错误!", ""
      yjk = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 9000) ;这里的返回值是1016,此窗口已经出现了,不是过vb的msgbox弹出的对话框。
    msgbox YJK
   
   
    If yjk = sqaSuccess Then
       Window SetContext, "Caption=错误!", ""
       PushButton Click, "Text=确定"
       Window SetContext, "Name=mainform", ""
       InputKeys "{NUM*}"
       Window SetContext, "Caption=提示信息", ""
       PushButton Click, "Text=否(N)"
    End if
   
    Window SetContext, "Name=mainform", ""
    InputKeys "{NUM*}"
   
    'delayfor(9000)
    Result3 = SQAWaitForPropertyvalue("Caption=提示", "Enabled",TRUE, 8000)
    'msgbox result3
    if Result3 <> sqaSuccess Then
       PushButton Click, "Text=是(Y)"
    End if
    next j
    'msgbox result3
End Sub

哪位高手告诉我,应该如何解决呢??

ilovejolly 发表于 2005-12-7 08:59:53

前面两句SQAWaitForPropertyvalue都是对的?

xuefeng 发表于 2005-12-7 09:47:36

是的,感谢版主!
如何将插图传上来呢?

ilovejolly 发表于 2005-12-7 11:39:06

发贴后点编辑就可以传附件了

xuefeng 发表于 2005-12-7 14:31:59

\\192.168.1.110\c$\Documents and Settings\Administrator\桌面\新建 位图图像 (3).jpg

xuefeng 发表于 2005-12-7 17:35:44

有没有人知道如何解决啊,着急呀

ilovejolly 发表于 2005-12-7 19:42:43

你的图都不能看呢
页: [1]
查看完整版本: 请教高手:SQAWaitForPropertyvalue 函数为何返回值是1016呢!