Skip to main content

How to Test Forgot Password


Testing e-mail can be a tricky process. Especially when dealing with things like forgot password. A lot of times this is something that gets checked manually. Or worse, it gets overlooked and ends up broken in production.

A Solution

By leveraging a third-party library we can perform an end-to-end test by accessing a forgot password email from a Gmail account headless (to get the information we need) and then put it to use with Selenium to make sure it works correctly.

Let's dig in with an example that uses the forgot password example on the-internet.

About The Author

Dave Haeffner is the original writer of Elemental Selenium -- a free, once weekly Selenium tip newsletter that's read by thousands of testing professionals. He also created and maintains the-internet (an open-source web app that's perfect for writing automated tests against).

Dave has helped numerous companies successfully implement automated acceptance testing; including The Motley Fool, ManTech International, Sittercity, and Animoto. He is also an active member of the Selenium project and has spoken at numerous conferences and meetups around the world about automated acceptance testing.

Dave Haeffner profile picture