Results 1 to 4 of 4
  1. #1

    Is this a bug in Visual Test?

    In the following section of code my VT script hangs at the first statement:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    WTreeItemExpand(&quot;@1&quot;, &quot;Alaska&quot;, 60)
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">The first statement expands the Alaska node of the Tree control and timeout after 60 seconds. But sometimes the server takes up to 4 minutes to send a reply back (due to heavy load, cross-continents, etc) and before the tree node gets expanded a dialog box pops up saying the operation timed out. My next line of code, CheckTimeoutDialog() is a function that checks for the dialog and closes it, but the problem is that Visual Test hangs on WTreeItemExpand("@1", "Alaska", 60) because it's still trying to expand the tree node. So WTreeItemExpand won't finish until the dialog is closed, and the dialog can't close until WTreeItemExpand is finished.

    I set the timeout for WTreeItemExpand to 60 seconds meaning it should stop trying to expand it after 60 seconds and go on to the next statement. But the timeout arguement seems to have no effect to the WTreeItemExpand function.

    Any ideas?? [img]images/icons/confused.gif[/img] [img]images/icons/confused.gif[/img] [img]images/icons/confused.gif[/img]

  2. #2

    Re: Is this a bug in Visual Test?

    It sounds to me as if you are trying to get a Visual Test script to control a dialogue that it has created. I don't think it can do that. The script will have paused waiting for the dialog to be closed before proceeding to the next line. Hence the apparent "hanging".

    I would suggest that you write an error handler something like this.
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">on Error goto handler

    WTreeItemExpand(&quot;@1&quot;,&quot;Alaska&quot;, 60)

    ' You may want to Print Error$ to check
    ' the actual error you are getting
    ' This causes the failing statement to be skipped
    ' Leave out the &quot;Next&quot; if you want the statement to be tried again
    Resume Next
    ' Pass the error on to a &quot;higher&quot; level
    Resume Error
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  3. #3

    Re: Is this a bug in Visual Test?

    The program I'm testing created the popup dialog (non system modal), not my script. My script just tries to close it, but it can't since it gets hung up on the first line of code. You'd expect the 60 argument for the timeout would cause the script to continue with the next line after 60 seconds but the 60 doesn't seem to have any effect...

  4. #4

    Re: Is this a bug in Visual Test?

    I've had this *exact* same problem. I was expanding the device manager tree and opening the properties box. The program would run through the tree without problem, then hang at random times.
    The same line of code works sometimes, and hangs at other times, and no matter how much error trapping or debugging I do, I cannot find a solution.
    Any workarounds for this function would be greatly appreciated here too.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:44 PM.

Copyright BetaSoft Inc.