Forum Discussion

g_kucharski's avatar
g_kucharski
Occasional Contributor
11 years ago

InvokeOnClick freezes whole TC

Hi,

I am writting tests in VBS for .net app based on Janus controls.



I am trying to invoke a CommandButton from their Ribbon.



I try sth like that:


objRibb.GetAllCommands.get_item_2(key).InvokeOnClick


Method seems to run ok, button is invoked, however... invoked command opens a new window. Test execution freezes until the window is closed. Changing settings of



Method Time Out

Aplication hanging timeout



does not help - the whole test is freezed. Any ideas howto go around that one?







  • Hi Grzegorz,



    See the description of the CallObjectMethodAsync method in TestComplete's help. It should do what you need.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Grzegorz,



    See the description of the CallObjectMethodAsync method in TestComplete's help. It should do what you need.
  • g_kucharski's avatar
    g_kucharski
    Occasional Contributor
    Thanks, it works!



    I found a workaround for them problem - I get command's bounds and call click not on the command but on the parent form, however CallObjectMethodAsync is much better solution. Thanks again. 
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Grzegorz,



    Thank you for the update.



    Your initial workaround sounds interesting... I think that it worked only because you called InvokeOnClick method but did not emulate the regular click on the control via Click method. Just as a note...