Forum Discussion

vexic's avatar
vexic
New Contributor
15 years ago

Double Click problems

Hi,



I have been having some trouble recently with getting my scripts to double click on some items.  They used to work fine, but now the double click has slowed down (or seemed to) and the items that were double clicked are no longer performing their function.



So my questions are:  Is there a setting that affects double click speed?  Was there a recent update that might have caused this behavior?



Thanks for any information.
  • Hi Jonathan,


    When playing back the double click action, TestComplete verifies whether the first click has been processed by the application before sending the second click. If it takes long to process the first click for some reason, the second click will be sent later than necessary, and therefore, it will be treated as an individual click event. The slowdown you observe might be caused by a great variety of factors. So, I recommend that you go through the following technical paper - this may help you significantly improve playback performance:

    http://www.automatedqa.com/techpapers/testcomplete/test-playback-performance-tips/


    Also, here is a script routine which may possibly work around the problem (try using this routine instead of the DblClick method):


    [VBScript]


    Function DblClick(obj)

      Dim X, Y

      X = obj.ScreenLeft + obj.Width / 2

      Y = obj.ScreenTop + obj.Height / 2

      Call Sys.Desktop.MouseDown(VK_LBUTTON, X, Y)

      Call Sys.Desktop.MouseUp(VK_LBUTTON, X, Y)

      Delay(50)

      Call Sys.Desktop.MouseDown(VK_LBUTTON, X, Y)

      Call Sys.Desktop.MouseUp(VK_LBUTTON, X, Y)

    End Function