Ask a Question

Double Click problems

New Contributor

Double Click problems


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.

RE: Double Click problems

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:

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


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)


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

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

End Function

Best regards,

Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!
Showing results for 
Search instead for 
Did you mean: