aerokube / images

Browser images for Selenoid and Moon 1.x
https://aerokube.com/images/latest/
Apache License 2.0
168 stars 126 forks source link

Support devtools and custom profile directory for Chrome via environment variable #628

Closed matthewlowry closed 1 year ago

matthewlowry commented 1 year ago

Offers a solution for https://github.com/aerokube/images/issues/627.

With this change you can set BROWSER_PROFILE_DIR in the container environment and the devtools proxy process will use that location when looking for the browser profile. E.g.:

{
  "capabilities": {
    "alwaysMatch": {
      "browserName": "chrome",
      "browserVersion": "114.0",
      "goog:chromeOptions": {
        "args": [ "user-data-dir=/profiles/custom.XYZ" ]
      },
      "selenoid:options": {
        "env": [ "BROWSER_PROFILE_DIR=/profiles/custom.XYZ" ]
      }
    }
  }
}
vania-pooh commented 1 year ago

@matthewlowry thank you for contribution!