Forum Discussion

mafuko's avatar
mafuko
Occasional Contributor
15 years ago

ClickButton method doesn´t work

Recently I discovered a few situations when the ClickButton method doesn´t work. The button object exists, it´s enabled and visible but ClickButton only places the mouse cursor over the button but nothing else happens - no clicking occurs. Running the test again also doesn´t help - still the same. The only thing that helps is restarting the tested application (VB6 app), but after a few successful clicks on the same button, the situation repeats. There is a workaround: checking the state of application some 2 seconds after the click was performed and in case nothing changed, repeat the click, but this is no a systematic approach and it only messes up my code. Has anyone experienced similar problems?
  • Hi,



    It looks like this problem may be related to your tested application. Can you reproduce it with any other applications (for example, with the Orders sample which is shipped along with TC).
  • mafuko's avatar
    mafuko
    Occasional Contributor
    I wasn´t able to reproduce the problem on the sample application :( but I managed to get over it by putting a 1 second pause before clicking.