I'm coding Selenium in Python and have the following issue:
selenium.common.exceptions.WebDriverException: Message: unknown error: >cannot create default profile directory
What I want to do is to use a different user to run my chromedriver, as my local user will not work in the wished URL.
I am trying to change the user showed in the following:
chrome_options.add_argument("user-data-dir=C:\\Users\\The user here i want to change\\Roaming\\Google\\Chrome\\User Data")
I have looked around and can't seem to find a solution. I have tried with this code:
chrome_options.add_argument("user-data-dir=my path for the user")
driver = webdriver.Chrome(executable_path=r'path for my webdriver', options=chrome_options)
driver.maximize_window()
driver.get(url)
But I keep getting an error.