cancel
Showing results for 
Search instead for 
Did you mean: 

InvokeOnClick freezes whole TC

SOLVED
Highlighted
Occasional Contributor

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?







1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

RE: InvokeOnClick freezes whole TC

Hi Grzegorz,



See the description of the CallObjectMethodAsync method in TestComplete's help. It should do what you need.
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

RE: InvokeOnClick freezes whole TC

Hi Grzegorz,



See the description of the CallObjectMethodAsync method in TestComplete's help. It should do what you need.
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Highlighted
Occasional Contributor

RE: InvokeOnClick freezes whole TC

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. 
Highlighted
Community Hero

RE: InvokeOnClick freezes whole TC

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...
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors