Results 1 to 6 of 6
  1. #1

    Pause until updated


    My Application needed different time to load datas from the database and show it in a new opened table or to open a treenode show its childs.
    What can I do to pause the QARun-Script-Flow this time?

    The Problem is the following:

    ; open the table-window and load table-items from the database

    while ActiveName <> Table_Window_Name
    pause 1, 'Seconds'

    Attach Table_Grid_Name ; it can be failed
    ; if the table-updaste not ended

    Wait seems to be work only at window but not at the grid.

    Does work Check (Table_Grid0001), if Check is a list-check at the table-grid?

    What can I use for waiting at update of the tree?

    The Application is a Java-Application with Suns JDK 1.3.0 at WinNT 4.0 SP 5. QARun-Version is 4.8.0.

    Thank you,


  2. #2

    Re: Pause until updated

    Does the mouse cursor become an hour glass while the tree is updating?

    "If your not part of the solution, there's good money to be made in prolonging the problem."
    If your not part of the solution, there's good money to be made in prolonging the problem.

  3. #3

    Re: Pause until updated

    You may want to look at the QARun identified attributes for the window or object. The CTRLENABLED function has been useful for us. This function determines if the specified control is enabled.

    The following is from the QARun Command Wizard:

    ret = CtrlEnabled( hCtrl )

    This function determines if the control whose window handle is hCtrl is enabled. The hCtrl can be determined from one of the ContrlFind(*) group of functions.

    The function returns 1 if the specified control is enabled and returns 0 if it is not.


  4. #4

    Re: Pause until updated

    We have a treeview that sometimes takes a few seconds to load. While it is loading the mouse pointer is an hour glass. So I created this function that makes the script sleep when the pointer is an hour glass. I just call the function when ever I see that the app shows and hour glass. This one comes in very handy. I also have another function that I call that waits for the application to be idle before continuing. But that requires DLLs that we created.

    Function WaitForNoHourGlass()
    Var CursorNumber
    Var Done = 0

    CursorNumber = MouseCursor()
    if CursorNumber = 3 or CursorNumber = 14
    TextPanel(1, "Waiting...")
    sleep 1
    Done = 1
    LogComment("Mouse Shape is: " + CursorNumber)
    Loop While Done = 0

    End Function

    "If your not part of the solution, there's good money to be made in prolonging the problem."
    If your not part of the solution, there's good money to be made in prolonging the problem.

  5. #5

    Re: Pause until updated

    With the TreeView you may be able to get away with using a TextSelect command to get QARun to click on the text within the control... when the text is not present, the script will initially fail until you set up an error handling routine.

    Make the routine simply pause for x milliseconds and then return to the TextSelect line in your script where it just failed. Then allow it to try again. (cheap sync, but it's worked for me in the past).


  6. #6

    Re: Pause until updated

    ContrlFind( ) / CtrlEnabled( hCtrl )- Strategy looks very nice. But it don't works by me (Runtime error: 'Attached Window no longer exist', but it is in a focus and I used GridFind at a Grid and TreeViewFind at a TreeView. I don't know, why it is so.
    But the WaitForNoHourGlass()-Function works. You should do Check at Grid before calling WaitForNoHourGlass().

    Thank you!




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 04:13 PM.

Copyright BetaSoft Inc.