title: Selenium: Trying to enter text in the active element without id but failing
body: <p>Trying to enter text in the active element but failing.. 
  Can anyone help? Code is as follows. element is commented on.
  Using python and selenium and web driver.</p>
  
  <p>using time to give breaks between code to wait for loading
  keyboard shortcuts are used to enter the elements as names for gmail are not available. </p>
  
  <pre><code>from selenium import webdriver
  import time
  from selenium.webdriver.common.keys import Keys
  
  u = input("Enter username: ")
  
  p = input("Enter password: ")
  
  a = input("Enter email address(multiple separated by comma: ")
  
  s = input("Enter subject: ")
  
  t = input("Enter text: ")
  
  
  browser = webdriver.Firefox()
  browser.get('https://accounts.google.com/ServiceLogin/identifier?service=mail&amp;passive=true&amp;rm=false&amp;continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&amp;ss=1&amp;scc=1&amp;ltmpl=default&amp;ltmplcache=2&amp;emr=1&amp;osid=1&amp;flowName=GlifWebSignIn&amp;flowEntry=AddSession')
  
  userid = browser.find_element_by_name("identifier")
  userid.send_keys(u)
  userid.send_keys(u'\ue007')
  
  time.sleep(2)
  
  passw = browser.find_element_by_name("password")
  passw.send_keys(p)
  passw.send_keys(u'\ue007')
  
  time.sleep(10)
  
  browser.get('https://mail.google.com/mail/u/0/#inbox?compose=new')
  
  time.sleep(5)
  
  to = browser.find_element_by_name("to")
  to.send_keys(a)
  fr = browser.find_element_by_name("subjectbox")
  fr.send_keys(s)
  fr.send_keys(Keys.TAB)
  
  x = browser.switch_to.active_element
  time.sleep(1)
  x.send_keys(t) #THIS IS NOT WORKING
  </code></pre>