input: Write a Python function to automate a login and profile photo update process using Selenium.
  assert automate_login_and_update_photo('http://example.com/', 'user@example.com', '1234', '/path/to/photo.jpg') == 'Profile photo updated successfully'
  assert automate_login_and_update_photo('http://example.com/', 'another_user@example.com', '5678', '/another/path/to/photo.jpg') == 'Profile photo updated successfully'
  assert automate_login_and_update_photo('http://example.com/', 'third_user@example.com', 'abcd', '/third/path/to/photo.jpg') == 'Profile photo updated successfully'
output: from selenium import webdriver
  from selenium.webdriver.common.by import By
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  
  def automate_login_and_update_photo(url, email, password, photo_path):
      driver = webdriver.Chrome()
      driver.get(url)
  
      # Logging in
      email_input = WebDriverWait(driver, 10).until(
          EC.presence_of_element_located((By.NAME, "email"))
      )
      password_input = driver.find_element(By.NAME, "password")
      login_button = driver.find_element(By.NAME, "login")
  
      email_input.send_keys(email)
      password_input.send_keys(password)
      login_button.click()
  
      # Navigating to profile page
      profile_link = WebDriverWait(driver, 10).until(
          EC.presence_of_element_located((By.LINK_TEXT, "Profile"))
      )
      profile_link.click()
  
      # Updating profile photo
      upload_input = WebDriverWait(driver, 10).until(
          EC.presence_of_element_located((By.NAME, "profile_photo"))
      )
      upload_input.send_keys(photo_path)
      
      save_button = driver.find_element(By.NAME, "save_photo")
      save_button.click()
  
      # Confirming the update
      success_message = WebDriverWait(driver, 10).until(
          EC.presence_of_element_located((By.ID, "success_message"))
      )
  
      driver.quit()
  
      return 'Profile photo updated successfully' if success_message else 'Profile photo update failed'