input: Write a function to automate the login process in a given website using Selenium in Python. The function should take the website URL, username, and password as inputs, perform the login, and print "Login successful!" if the login is successful. If the function fails to perform the login for any reason, it should catch the exception and print "Login failed!".
  
  def login_automation(url, username, password):
      from selenium import webdriver
      from selenium.webdriver.common.keys import Keys
      import time
      
      try:
          # 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')
          
          # Enter username
          username_field.send_keys(username)
          
          # Locate password field
          password_field = driver.find_element_by_name('password')
          
          # Enter password
          password_field.send_keys(password)
          
          # Locate submit button
          submit_button = driver.find_element_by_name('submit')
          
          # Click submit button
          submit_button.click()
          
          # Wait for login process to complete
          time.sleep(5)
          
          # Login successful
          print('Login successful!')
          
      except Exception as e:
          print('Login failed!')
      
      finally:
          driver.close()
  
  assert login_automation('http://www.example.com', 'correct_username', 'correct_password')=='Login successful!'
  assert login_automation('http://www.example.com', 'wrong_username', 'wrong_password')=='Login failed!'
output: def login_automation(url, username, password):
      from selenium import webdriver
      from selenium.webdriver.common.keys import Keys
      import time
      
      try:
          driver = webdriver.Chrome()
          driver.get(url)
          username_field = driver.find_element_by_name('username')
          username_field.send_keys(username)
          password_field = driver.find_element_by_name('password')
          password_field.send_keys(password)
          submit_button = driver.find_element_by_name('submit')
          submit_button.click()
          time.sleep(5)
          print('Login successful!')
      except Exception as e:
          print('Login failed!')
      finally:
          driver.close()