i have a test case where user clicks on a button to send an e-mail and user's default e-mail client opens up. In my case I am using outlook as my default e-mail client. What would be the best way to automate this flow. I am using the GEB framework and I have never automated any external component before. It would be great if someone could atleast point me to the right direction to start.


  • With GEB you mean gebish.org ? Also what do you want to test, that the mail application opens? Jul 31, 2015 at 16:53
  • Yes, for both. I want to make sure that the application opens up. Jul 31, 2015 at 16:57
  • Does it have to be Outlook's desktop app? You could setup your machine to use any handler for mailto links. Outlook has a web equivalent (or even use gmail) that might be easier to automate.
    – kirbycope
    Jul 31, 2015 at 19:39

2 Answers 2


There are probably two parts to this:

  • Testing every condition that triggers launching an email client. I would use a web-based email client for this.
  • Testing the logic that launches email clients. Since there are lots of possible clients, and you can't drive these with a web automation framework, I recommend testing this by hand. If this logic is not expected to change often, it may not make sense to spend money writing/maintaining automated tests for it.

With web-automation frameworks you cannot test beyond the browser.

Tools like Sikuli or Auto-IT can be triggered (with Process.Start() or Exec()) from the test to do an action that needs input from the operating system outside of the browser.

In your case I wonder if just checking the button has the correct "mailto:" link would not be enough. The browser mailto: system always fires up the default browser. You may expect that the operation system supplier has tested that this works for you.

  • Thanks. It is not mandated that I test this in outlook. I can also change my default e-mail client to a web based e-mail. In that case how do I proceed? Jul 31, 2015 at 17:06
  • Find the new window that opened and continue testing from there? :) Jul 31, 2015 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.