Ask a Question

TestComplete is getting hanged when i try to spy the microsoft office outlook pop up

New Contributor

TestComplete is getting hanged when i try to spy the microsoft office outlook pop up

TestComplete is getting hanged when i try to spy the microsoft office outlook pop up, and it comes back once i again close the Microsoft OutLook Pop Up.



We are working on project which is built on Progresso environment, we have a scenario were Open Account application ( Progresso) tries to send the mail on behalf of us using the default mail server configured.


Case1: When we are configured with WindowsMail, windowsMail pop up comes up and we have to click on send button to send mail on behalf of and it is working fine.


Case2:When we are configured with Microsoft OutLook, Microsoft OutLook pop up comes and we have to click on allow button to send mail on behalf of but when we spy TestComplete becomes Not Responding and it comes to its normal state when we manually close the Microsoft OutLook pop up.


SmartBear need your support in rersolving this issue.


Thanks in Advance



Hi Sharana


Does this happen for any other Outlook pop up windows. For example if you were sending an email to blank subject you should get a pop up saying "Do you want to send message with subject"


Does TestComplete still freeze. 


Can you tell me the version of TestComplete you are working with and also the version of Outlook




New Contributor

Hi Damien


thanks for your quick response,


TestComplete does not freeze when using OutLook pop up which get from Ms OutLook and it is noticed that when i spy it generates the script as below:


Sys.Process("OUTLOOK").Dialog("Microsoft Office Outlook")


But when the pop up comes from the Progresso application test complete gets freezed and i tried to spy for my luck after waiting for an hour once it generated the below script for outlook pop up


Sys.Process("prowin32").Dialog("Microsoft Office Outlook")


We are using Test Complete Version 10.40.2015.7 and OutLook Version : Microsoft OutLook 2007.


Thanks in advance

Sharana Basavaraj



SmartBear Alumni (Retired)

Hi Sharana,


It makes sense to check if * is enabled in MSAA or UI Automation project option. Uncheck this option – it could bring serious performance issues as TestComplete is trying to treat all objects by using one of those technologies.


As a rule, there is no need to work with Outlook windows during the test (of course, if you don’t test Outlook itself). What is your task? Perhaps, we could suggest an alternative solution for you.


Tanya Yatskovskaya
SmartBear Community and Education Manager

Hi Tanya,


As suggested we tried removing * from MSAA and UI Automation but it had not made any difference.


We are not directly working with the Microsoft OutLook, it is our application which call the default configured mail server to send mails on behalf of.


And when that OutLook comes up TestComplete literally Hangs and we cannot even do the spy operation, when we manually click on Deny button then  Test Complete comes to its normal state.


I have also did the below steps: to avoid the pop up:


The Programmatic Access security settings in the Trust Center provide the following options:

  • Warn me about suspicious activity when my antivirus software is inactive or out-of-date (recommended)      This is the default setting in Office Outlook 2007. Suspicious activity refers to an untrusted program attempting to access Outlook.

  • Always warn me about suspicious activity      This is the most secure setting and you will always be prompted to make a trust decision when a program attempts to access Outlook.

  • Never warn me about suspicious activity (not recommended)      This is the least secure setting.

I have set the setting to "Never warn me about suspicious activity (not recommended)      This is the least secure setting."

but still no luck, it is behaving same....


Hope this understand our problem, please let me know for any more info.




Occasional Contributor

I don't believe this is anything that SmartBear can help with. I may be way off here but I believe that Outlook has a security procedure that will prevent any unknown source from accessing that popup to prevent malware from getting around it.


Do some research online about that message and you should be able to find a way around it. If you are running an up to date anti-virus that actually communicates with Windows then this message should never come up. A lot of popular software will skip that message if Windows knows about the application but in the case of an in house developled application thats not likely to happen. Also if your security restrictions aren't too bad you can tell Outlook to never show that message box but that presents a possible security failure.


Other than those options your only other hope may be to see if you can find the MSAA name of that popup some other way they using spy but this may just loop back to the first issue of an unknow application accessing that popup.


Again I may be way off base but that's what I can gather from my vague memory of dealing with that popup in the past.

SmartBear Alumni (Retired)

Hi Sharana,


If you don’t work with Outlook’s GUI, I suggest that you consider writing a script that will implement your task via Outlook’s COM object. The following article contains an example of how to receive e-mails via COM in TestComplete. If you learn COM’s documentation, you will find a way to send e-mails:



Tanya Yatskovskaya
SmartBear Community and Education Manager

Showing results for 
Search instead for 
Did you mean: