input: Write a function to automate the login process on a specified website using Selenium in Python.
  
  assert automate_login('http://www.example.com', 'username', 'password')=='Login successful!'
  assert automate_login('http://www.invalidurl.com', 'invaliduser', 'invalidpass')!=None
  assert automate_login('', 'username', 'password')!=None
  assert automate_login('http://www.example.com', '', '')!=None
output: def automate_login(url, username, password):
      from selenium import webdriver
      from selenium.webdriver.common.by import By
      from selenium.webdriver.common.keys import Keys
      from selenium.webdriver.chrome.service import Service
      from selenium.webdriver.chrome.options import Options
      import time
  
      try:
          chrome_options = Options()
          chrome_options.add_argument("--headless")
          service = Service()
          driver = webdriver.Chrome(service=service, options=chrome_options)
          driver.get(url)
          
          time.sleep(2)
          
          username_field = driver.find_element(By.NAME, 'username')
          password_field = driver.find_element(By.NAME, 'password')
          
          username_field.send_keys(username)
          password_field.send_keys(password)
          password_field.send_keys(Keys.RETURN)
          
          time.sleep(2)
          
          if "Login successful!" in driver.page_source:
              driver.quit()
              return 'Login successful!'
          else:
              driver.quit()
              return 'Login failed!'
      except Exception as e:
          driver.quit()
          return str(e)