input: Write a function to create a Selenium script in Python that automates the login process on the website www.example.com. The function should initialize a web driver, navigate to the target web page, locate and input the username and password, click the submit button, and print a message indicating a successful login. After successful login, the script should close the driver.
  assert automate_login()=='Login successful!'
  assert automate_login()=='Login successful!'
output: def automate_login():
      from selenium import webdriver
      from selenium.webdriver.common.by import By
      from selenium.webdriver.common.keys import Keys
  
      driver = webdriver.Chrome()
      driver.get("http://www.example.com")
      
      username = driver.find_element(By.ID, "username")
      password = driver.find_element(By.ID, "password")
      submit_button = driver.find_element(By.ID, "submit")
      
      username.send_keys("your_username")
      password.send_keys("your_password")
      submit_button.click()
      
      print("Login successful!")
      driver.quit()
      
      return "Login successful!"