Search code examples
vncselenoid

How to connect to Selenoid browser container with VNC?


I know what I can use Selenoid-UI to connect to running webdriver container using my browser. But is there any ability to connect to container using one of VNC clients?


Solution

  • Two possible ways:

    1) Launch browser VNC container as follows and connect with any VNC client using vnc://localhost:4444 and password selenoid:

    $ docker run -d --name browser -p 4444:4444 -p 5900:5900 selenoid/vnc:firefox_58.0
    

    2) Use Selenoid /vnc/ API. Having some running session ID, e.g. bd0415ac-3cbc-427d-b1e6-d142889a6afa you can access a web-socket proxying VNC traffic like this:

    ws://selenoid-host.example.com:4444/vnc/bd0415ac-3cbc-427d-b1e6-d142889a6afa
    

    Getting VNC traffic from web-socket is a built-in feature of some web-based VNC clients, e.g. noVNC used in Selenoid UI.