title: Using selenium: How to keep logged in after closing Driver in Python
body: <p>I want to get my Whatsapp web (web.whatsapp.com) logged in, at the second time opening the Whatsapp web on chrome driver. Following is my code based on Python need your help.</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  
  
  chrome_path = r"chromedriver.exe"
  options = Options();
  options.add_argument("user-data-
  dir=C:/Users/Username/AppData/Local/Google/Chrome/User Data");
  #options.add_argument("--start-maximized");
  driver = webdriver.Chrome(chrome_path,chrome_options=options);
  
  #driver = webdriver.Chrome();
  driver.get('https://web.whatsapp.com/')
  </code></pre>