Forum Discussion

Maros94's avatar
Maros94
New Contributor
2 years ago

Starting TestComplete test after a MS Teams call is recognized

Dear TestComplete Community,

 

I am struggling with automating the following scenario and would love some help on this.

 

I have two physical windows 11 machines running MS Teams clients. I need to automate calling from Machine A through Teams and accept the call on Machine B. I already automated the first part. The part I am struggling with is starting a test when a call comes in on Machine B. I basically need TestComplete / TestExecute to either start a test once this event occurs or run a test that will run forever and wait until the Teams call / Toast occurs on Machine B and continues with accepting the call etc. 

 

So the ideal scenario would be:

 

1. MS Teams client on Machine A calls the MS Teams client on Machine B (TestComplete)

2. Machine B receives a call from Machina A. Call is ringing and teams toast is visible.

3. TestExecute will either start a test where the accept is programmed or a test that is already running infinitely and recognizes this call and continues with the test (accepting, putting the call on hold, etc etc.)

 

Right now I am timing this through Windows Task Scheduler but would really like to have some kind of waiting/processing mechanism once an inbound call is recognized on the second machine, the call will be accepted and handled according to the test.

 

Thanks in advance for your help!

 

 

Edit: I am only using keyword tests since I am not familiar with scripting yet. 

1 Reply

  • Hi Maros94!

     

    We have Event Handlers in TC that should allow you to handle this scenario.

     

    An event is a specific action that occurs during the test run. This can be an action that occurs in TestComplete or in some other application. An example of an event that may occur quite often when testing desktop applications is the appearance of an unexpected window during the test execution.

     

    With TestComplete you can create a script routine or keyword test that will be executed when an event occurs. This script or keyword test is called an event handler. It can perform specific operations you would like to do in response to the event. 

     

    You may find information below about handling events within TC;

    https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/about.html

     

    I hope this helps!