This is one of the most viewed posts on my blog, and it is very much out of date. Please do not try to use this code. It will not work. I'm sorry, but I'm neither using Selenium nor writing automated acceptance tests for anything right now as I have moved on to a very different role, so it's doubtful that any of these selenium related posts will be updated.
The general idea is still the same, but Gmail has changed very much, and if you are looking for a copy/past solution to send an e-mail via Gmail for some reason (and I'm not sure why you'd use selenium for that...it's really a testing framework) this isn't going to work. Sorry. I'll leave the original post below for historical purposes. Thanks!
I'm trying to learn more about using Selenium Web Driver for testing web applications, so I've spent a good chunk of time this weekend doing all kinds of little things with websites, just to learn my way around.
The hardest one I had was sending an e-mail with GMail. That 'Compose' button was tricky for me at first.
Here is the result of my efforts, just in case anyone ever wants to automate GMail with Selenium, I hope it helps you out.