[Python] How to use Chrome Profile in Selenium Webdriver Python 3 [duplicate]

Discussão em 'Python' iniciado por Stack, Agosto 23, 2025.

  1. Stack

    Stack Membro Participativo

    So whenever I try to use my Chrome settings (the settings I use in the default browser) by adding

    options = webdriver.ChromeOptions()
    options.add_argument("user-data-dir=C:\Users\... (my webdriver path)")
    driver = webdriver.Chrome(executable_path="myPath", options=options)


    it shows me the error code

    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes n 16-17: truncated \UXXXXXXXX escape


    in my bash. I don't know what that means and I'd be happy for any kind of help I can get. Thanks in advance!

    Continue reading...

Compartilhe esta Página