I'm trying to get Selenium to open Chrome in a specific Chrome Profile, however it doesn't quite work; the profile isn't displayed in Chrome, and when I go to chrome://version in the browser when my program is running, it says the Profile Path is "C:\Users\USER-NAME\AppData\Local\Google\Chrome\User Data\Profile 1\Default" even though there's no "Default" file or directory in the "Profile 1" directory.
Here's my code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("user-data-dir=C:\\Users\\USER-NAME\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")
driver = webdriver.Chrome("path/to/chrome-driver", options=options)
driver.get("some-url")
I've looked at several solutions on Stack Overflow and none of them have solved the problem. I've tried many potential solutions (none of them have worked) but they all boil down to what this answer says: https://stackoverflow.com/a/31063104/17273033