Forum Discussion

leeasdf9's avatar
leeasdf9
Frequent Contributor
6 years ago
Solved

Testcomplete still waits for timeout of click operation on JButton after it was clicked

This is a really weird behaviour on very common javax.swing.JButton object, it is about a single click event of JButton. After JButton was clicked, it does not go to next action but still waits unt...
  • AlexKaras's avatar
    6 years ago

    Hi,

     

    While waiting for the reply from Support you may try this function as a workaround:

    //-----------------------------------------------------------------------------
    
    function ClickEmulate(oObj);
    begin
      LLPlayer.MouseDown(Win32API.VK_LBUTTON,
          oObj.ScreenLeft + 1, oObj.ScreenTop + 1, 500);
      LLPlayer.MouseUp(Win32API.VK_LBUTTON,
          oObj.ScreenLeft + 1, oObj.ScreenTop + 1, 500);
    end;
    //-----------------------------------------------------------------------------