title: Selenium WebDriver closes after everything is done
body: <p>So I'm trying to make a Messenger bot using Selenium and Python. I don't have any code errors my code works just fine, the problem is that after it's done it just kills the WebDriver.
  Here's my code: </p>
  
  <p><pre>from selenium import webdriver</p>
  
  <p>login_email = "" #Your facebook email
  login_password = "" #Your facebook password</p>
  
  <p>def login_pulamea():</p>
  
  <code>    driver = webdriver.Chrome()
      driver.get("http://messenger.com")
  
      #Waits for page to load
      driver.implicitly_wait(10)
  
      # Inputing email
      email_box = driver.find_element_by_xpath("""//*[@id="email"]""")
      email_box.clear()
      email_box.send_keys(login_email)
  
      # Inputing password
  
      password_box = driver.find_element_by_xpath("""//*[@id="pass"]""")
      password_box.clear()
      password_box.send_keys(login_password)
  
      #Submit details
  
      submit_button = driver.find_element_by_xpath("""//*[@id="loginbutton"]""")
      submit_button.click()
  
  login_pulamea()
  </code></pre>