title: Python Selenium Chrome "user data directory is already in use"
body: <p>I'm trying to make a script in python with selenium that will open a website and click a button.
  Problem is that I have to close chrome before I can run the script otherwise I get this error:</p>
  <pre><code>Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
  </code></pre>
  <p>Is there a way around this so I don't have to close chrome before running the script everytime?</p>
  <p>My code:</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  import time
  
  PATH = &quot;C:\Program Files (x86)\chromedriver.exe&quot;
  
  options = webdriver.ChromeOptions() 
  options.add_argument(&quot;user-data-dir=C:/Users/username/AppData/Local/Google/Chrome/User Data&quot;)
  driver = webdriver.Chrome(executable_path=r'C:\Program Files (x86)\chromedriver.exe', chrome_options=options)
  driver.get(&quot;https://disboard.org/sv/dashboard/servers&quot;)
  
  link = driver.find_element_by_link_text(&quot;bump&quot;)
  link.click()
  </code></pre>