Forum Discussion

kgreger's avatar
kgreger
Occasional Contributor
2 months ago

Outlook 365 automation

I need to automate a process where my main application opens Outlook, creates an email, fills out some fields, and sends out the email.  At times, each email is mapped to another "class" of Outlook objects, in which, no controls can be located during playback.  And even when all controls appear to be mapped to the same class, the panelMessage never seems to be identified.  Is there a setting somewhere that needs to be adjusted?

I'm using Outlook 365 with TestComplete 15.73.16.7 x64.

Thanks!

 

 

 

 

10 Replies

    • Hassan_Ballan's avatar
      Hassan_Ballan
      Icon for Champion Level 1 rankChampion Level 1

      Would you mind marking as solution the post that solved it for you.

  • kgreger's avatar
    kgreger
    Occasional Contributor

    I am not trying to test Outlook independently.  I am testing an application, which in turn uses Outlook to create an email.  This entire of process of email creation from my application is what I would like to have automated.  Sorry for not being clear.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      Got it!

      If you enable MSAA in Project Settings,

      Then majority of all Outlook controls will be exposed to TestComplete, as shown below

       

  • scot1967's avatar
    scot1967
    Icon for Champion Level 1 rankChampion Level 1

    It sounds like his tested application is performing this action and what is needed is to perform this in automation within the tested app.

     I need to automate a process where my main application opens Outlook, creates an email, fills out some fields, and sends out the email. 

    • kgreger's avatar
      kgreger
      Occasional Contributor

      Thank you, you are 100% correct!

  • catalin_ochisor's avatar
    catalin_ochisor
    Occasional Contributor

    Hmm... all that you need is to send an email from Outlook or there is more attached to the test? There is an example for this at:

    https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html?sbsearch=Sending%20emails

    Also, check related info:

    https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/sendmail.html

    Maybe research for another approach than getting too deep into Outlook- sent email using another solution? move emails in folders in separate step not using Outlook?

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    Are you actually testing Outlook 365? I don't understand the purpose of using TestComplete to automate Outlook 365!?

  • scot1967's avatar
    scot1967
    Icon for Champion Level 1 rankChampion Level 1

    It has been my experience that automating Microsoft apps or any apps that were not built by your team is a challenge.  Have you looked into the settings in Tools\...Project Properties\Open Applications\MSAA?

    https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/msaa/index.html

    There are quite a few advanced settings in 'Open Applications' as well as 'Object Mapping' you may find useful.  I can't speak to your specific situation but I have used MSAA to expose controls buried in Microsoft tree objects that were otherwise not accessible (or just flakey in automation).

    ... If you find my posts helpful drop me a like! πŸ‘ Be sure to mark the best answer if you get one to help others out and to credit the one who helped you.  😎

    Good luck!