old_contents: from selenium import webdriver
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  
  from user import USER, PASSWORD
  
  url_googlelogin = "https://accounts.google.com/ServiceLogin"
  dcap = dict(DesiredCapabilities.PHANTOMJS)
  dcap["phantomjs.page.settings.userAgent"] = (
      "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 "
      "(KHTML, like Gecko) Chrome/15.0.87"
      )
  
  driver = webdriver.PhantomJS(desired_capabilities=dcap)
  driver.get(url_googlelogin)
  
  driver.find_element_by_id("Email").send_keys(USER)
  driver.find_element_by_id("Passwd").send_keys(PASSWORD)                                                            
  driver.find_element_by_id("signIn").click()    
  print driver.current_url
  driver.quit()
  
new_contents: from pyvirtualdisplay import Display
  from selenium import webdriver
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  
  from user import USER, PASSWORD
  
  url_googlelogin = "https://accounts.google.com/"
  dcap = dict(DesiredCapabilities.PHANTOMJS)
  dcap["phantomjs.page.settings.userAgent"] = (
      "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 "
      "(KHTML, like Gecko) Chrome/15.0.87"
      )
  display = Display(visible=0, size=(800, 600))
  display.start()
   
  #driver = webdriver.PhantomJS(desired_capabilities=dcap)
  driver = webdriver.Firefox()
  driver.get(url_googlelogin)
  
  driver.find_element_by_id("Email").send_keys(USER)
  driver.find_element_by_id("Passwd").send_keys(PASSWORD)                                                            
  driver.find_element_by_id("signIn").click()    
  
  print driver.current_url
  
  url_login_ok = "https://myaccount.google.com/?pli=1"
  url_login_bad = "https://accounts.google.com/ServiceLoginAuth"
  
  if driver.current_url != url_login_ok:
      raise Exception("Login failed")
  else:
      print "Login ok"
  
  url_console = "https://console.developers.google.com/project"
  driver.get(url_console)
  
  project_name = "application-001"
  driver.find_element_by_id("projects-create").click()
  driver.save_screenshot('out2.png')
  driver.find_element_by_name("name").send_keys(project_name)
  driver.find_element_by_name("ok").click()
  
  
  
  driver.quit()
  display.stop()
  
subject: create project