Skip to content

[πŸ› Bug]: --user-data-dir and add_extension could not work together?Β #16308

@GlobalMe2017

Description

@GlobalMe2017

Description

i try to open a chrome with a pre-set user-data-dir and then load an extension with crx in a folder.

but it does not work, i tried as below, there is no error no success

what should i do?

Reproducible Code

opts = Options()
opts.add_argument(f"--user-data-dir={profile_path}")
DIR_BASE = os.path.dirname(os.path.abspath(__file__))
ext_path = f"{DIR_BASE}\\crx\\mcohilncbfahbmgdjkbpemcciiolgcge.crx"
opts.add_argument(f"--load-extension={ext_path}")
# opts.add_extension(ext_path)
driver = webdriver.Chrome(options=opts)

Debugging Logs

no error no success

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsD-chromeI-defectSomething is not working as intendedJ-awaiting answerQuestion asked of user; a reply moves it to triage againOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions