Skip to content

Ability to connect to a browser over websocket instead of running local executable? #362

@geoffharcourt

Description

@geoffharcourt

Hello Percy team!

We currently run our browser-based tests using Chrome in a separate container from our application. There's a few reasons for doing this, including making it easy for us to swap out different versions of Chrome for testing, minimizing Docker image size, etc. We currently end up installing Chromium in order to have something present for asset discovery, but it's only used by Percy.

It looks like you're now controlling the browser over a websocket now as you're moving away from being coupled to Puppeteer. Would you be open to a change where a user could supply an environment variable like PERCY_REMOTE_BROWSER_URL and when that is present, the executable-launching (and installing) steps would be bypassed and the URL would be used to connect here:

this.ws = new WebSocket(await this.address(timeout), { perMessageDeflate: false });

This would save us a 130MB of install in some of our CI images but also would let us get rid of a lot of complexity, as Chrome and Chromium are kind of awkward to use in Alpine Linux.

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🍞 staleClosed due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions