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 until wait-timeout of this click event ends. i could not figure it out yet.

i am user of Testcomplete 12.50

  • 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;
    //-----------------------------------------------------------------------------
    

     

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    This is a problem experienced by many users in many different applications.  I don't know if it's been fixed yet in 12.60.  Please submit the problem to SmartBear support.

    • leeasdf9's avatar
      leeasdf9
      Frequent Contributor

      hi Martin,

      thanks for your information, i am glad to hear that i am not onlyone.

      BR,

      Lee

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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;
    //-----------------------------------------------------------------------------
    

     

    • leeasdf9's avatar
      leeasdf9
      Frequent Contributor

      Hi Alex,

      thanks a lot for the workaround, i will try it out.

      BR,

      Lee