views:

47

answers:

3

I have tried this probably 6 or 7 different ways, such as using various attribute values, XPath, id pattern matching (it always matches ":\w\w"), etc. as locators, and nothing has worked. If anyone can give me a tested, confirmed-working locator string for this button, I'd be much obliged.

A: 

We automate Gmail with iMacros and that works well. The tricky part is that the element ID seem to change randomly between page loads! See this forum post about automating Gmail. Does Selenium support clicking at a fixed X/Y position? That should solve it. Or use the basic HTML interface as suggested in the forum post.

Ruby8848
A: 

If you want to emulate a click on the button, just go to #compose.

leoluk
A: 

If you're using Python, use the mechanize library and access Gmail's HTML version. The Send button is simply a form submit button.

import re
import mechanize

br = mechanize.Browser()
br.open("http://htmlversionofgmail.com/composewindow")

br.select_form(nr=0) # select the first form
# Do some stuff, fill out the subject, whatever.
response = br.submit()
Lionel