how do I check Outlook window using Ruby cucumber?

239 views Asked by At

I am testing web application using Cucumber. There's certain link on the web page when clicked will trigger Microsoft Outlook to create an email to be sent to someone.
How do I switch from web browser to Outlook email window created from Outlook? Check the Subject? Check the To: (email recipient)? Close the email window, switch back to web browser and pass the Then test.

what sort of libraries and methods do I need to use?

2

There are 2 answers

0
Andy Waite On

You can't do this with Capybara. I suggest checking the content of the mailto link.

1
Phil On

This cannot be achieved with Selenium WebDriver/Capybara/Cucumber.

You can potentially use Outlook 365 (the online version of Outlook) to log in and automated your verification on the email. It's possible that you may run into captchas there though.

Personally I have emails delivered to a mailinator account. I check an inbox there to verify end-to-end email deliveries. This has worked for me. This allows for complete integration testing of frontend/backend/smtp components.