Google Groups

Stop trying to automate GMail


Jim Evans May 8, 2013 3:37 AM
Posted in group: Selenium Users
It happens time and time again. There are heaps of posts on this list of well-intentioned people trying to automate GMail. Usually, it's one of three scenarios those people are trying to solve.

One scenario is that the poster is trying to learn to use WebDriver and wants a public site to learn against. The problem is that the GMail page is *so* complex, and changes so often, that it's a poor choice for learning. It'll be the source of a ton of frustration for anyone trying to learn.

The other two scenarios are related. Either the application the poster is testing accepts input from email, or sends notifications via email, and they want to validate that functionality. In both cases, the important thing is generating or reading the email messages, not that they be accessed through the GMail website. GMail provides access to the mail store for sending and receiving via raw SMTP and IMAP, respectively. Most languages have libraries to handle these protocols so that you can manipulate the email account for sending and receiving without ever firing up a browser. Use these instead.

Unless you're a Google employee, working on the GMail web client team, then please, for the love of all that's holy, do not, do not, *do* *not* attempt to automate GMail using WebDriver.