input: Write a function to create a Selenium script in Python that automates the login process on a given website. The function should perform the following steps: initialize a web driver, navigate to the specified URL, locate and input the username and password, submit the form, and print a success message once the login process completes.
  
  from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  import time
  
  def automate_login(url, username_field, password_field, submit_button, username, password):
      # Initialize web driver
      driver = webdriver.Chrome()
      
      # Navigate to the target web page
      driver.get(url)
      
      # Locate username field
      username_input = driver.find_element_by_name(username_field)
      
      # Enter username
      username_input.send_keys(username)
      
      # Locate password field
      password_input = driver.find_element_by_name(password_field)
      
      # Enter password
      password_input.send_keys(password)
      
      # Locate submit button
      submit = driver.find_element_by_name(submit_button)
      
      # Click submit button
      submit.click()
      
      # Wait for login process to complete
      time.sleep(5)
      
      # Print success message
      print('Login successful!')
      
      driver.close()
  
  assert automate_login('http://www.example.com', 'username', 'password', 'submit', 'example_username', 'example_password')
  assert automate_login('http://www.anothersite.com', 'loginId', 'loginPass', 'loginButton', 'user', 'pass')
output: def automate_login(url, username_field, password_field, submit_button, username, password):
      driver = webdriver.Chrome()
      driver.get(url)
      username_input = driver.find_element_by_name(username_field)
      username_input.send_keys(username)
      password_input = driver.find_element_by_name(password_field)
      password_input.send_keys(password)
      submit = driver.find_element_by_name(submit_button)
      submit.click()
      time.sleep(5)
      print('Login successful!')
      driver.close()