input: from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  import time
  
  def automate_login(url: str, username_element: str, password_element: str, submit_element: str, username: str, password: str) -> str:
      """ Automate the login process for a given website using Selenium.
      >>> automate_login('http://www.example.com', 'username', 'password', 'submit', 'myuser', 'mypass')
      'Login successful!'
      >>> automate_login('http://www.example2.com', 'user', 'pass', 'login', 'testuser', 'testpass')
      'Login successful!'
      """
      # Initialize web driver
      driver = webdriver.Chrome()
  
      # Navigate to the target web page
      driver.get(url)
  
      # Locate username field
      username_field = driver.find_element_by_name(username_element)
  
      # Enter username
      username_field.send_keys(username)
  
      # Locate password field
      password_field = driver.find_element_by_name(password_element)
  
      # Enter password
      password_field.send_keys(password)
  
      # Locate submit button
      submit_button = driver.find_element_by_name(submit_element)
  
      # Click submit button
      submit_button.click()
  
      # Wait for login process to complete
      time.sleep(5)
  
      # Login successful
      login_status = 'Login successful!'
  
      driver.close()
  
      return login_status
output:     # Check if login was successful
      try:
          driver.find_element_by_xpath("//*[contains(text(), 'Welcome')]")
      except:
          login_status = 'Login failed!'
  
      driver.quit()
  
      return login_status