Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Support custom browser profile dir for Chrome via environment variable #627

Closed
matthewlowry opened this issue Jun 26, 2023 · 1 comment
Closed

Comments

@matthewlowry
Copy link
Contributor

Following from aerokube/selenoid#1355.

I would like to be able to pass a custom profile directory to Chrome. The use case is mounting a directory from the host into the Chrome container so a prepared custom profile directory can be passed between a series of sessions in a test suite.

Currently if I do this:

{
    "capabilities": {
        "alwaysMatch": {
            "browserName": "chrome",
            "browserVersion": "114.0",
            "goog:chromeOptions": {
                "args": [
                    "user-data-dir=/profiles/custom.XYZ"
                ]
            }
        }
    }
}

then Devtools cannot be used because the /devtools/devtools proxy process inside the container can no longer find the browser profile directory. It is hard coded to look for the temporary location provided by chromedriver.

It would be nice if there was some mechanism, such as an environment variable, to pass the required information to the devtools proxy process in the container. I will raise a PR shortly offering a solution.

@vania-pooh
Copy link
Member

Fixed in #628.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants