This reference for version: v1.5.6

Simple status page with UI updates by SSE, backed by constant polling of status handle of Selenoid on small go backend. Source code available at GitHub.

ui Recorded with licecap

1. Quick Start Guide

1.1. When you have Docker

  1. If you know exact uri of selenoid - just specify it with --selenoid-uri. No matter this is the same host or not.

    $ docker run -d --name selenoid-ui -p 8080:8080 aerokube/selenoid-ui --selenoid-uri http://${SELENOID_HOST}:4444
    It can’t be localhost or 127.0.0.1 until the UI is started in the same container as selenoid.
  2. When the UI and Selenoid on the same host you need to determine selenoid uri accessible from UI container. Usually it can be the docker gateway address.

    • If you use default network mode, firstly

      $ DOCKER_GATEWAY_ADDR=`docker inspect selenoid -f {{.NetworkSettings.Gateway}}`
      $ echo $DOCKER_GATEWAY_ADDR
      172.17.0.1 (1)
      1 May be different
      For MacOS you should determine interface with help of netstat. Remember that gateway address and host address is not the same in this case.

You can also try magic command ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1

+ - Then run Selenoid UI

+

$ docker run -d --name selenoid-ui -p 8080:8080 aerokube/selenoid-ui --selenoid-uri http://${DOCKER_GATEWAY_ADDR}:4444
  1. On the same host you can just link with selenoid container:

    • Assumed you have selenoid container already up and running

      $ docker ps
      
      CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                                                   NAMES
      fc479233071d        aerokube/selenoid      "/usr/bin/selenoid..."   10 minutes ago      Up 10 minutes       0.0.0.0:4444->4444/tcp                                  selenoid
    • Just run linked UI:

      $ docker run -d         \
          --name selenoid-ui  \
          --link selenoid     \ (1)
          -p 8080:8080        \
          aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444 (2)
      1 selenoid is name of Selenoid container
      2 should be the same as link name
      UI will think that http://selenoid:4444 is real address of selenoid. But it’s true only inside of UI container.

1.2. With Docker Compose

With docker compose remember to use the same network with selenoid and browser containers. For now this is only bridge network mode.

version: '3'
services:
  selenoid:
    image: "aerokube/selenoid"
    network_mode: bridge
    ports:
      - "4444:4444"
    volumes:
      - "$PWD:/etc/selenoid/" # assumed current dir contains browsers.json
      - "/var/run/docker.sock:/var/run/docker.sock"
  selenoid-ui:
    image: "aerokube/selenoid-ui"
    network_mode: bridge
    links:
      - selenoid
    ports:
      - "8080:8080"
    command: ["--selenoid-uri", "http://selenoid:4444"]

1.3. When you don’t have Docker

Or just want to dramatically simplify all the things :)
  1. Download Selenoid UI binary from releases page.

  2. Start it:

    $ ./selenoid-ui --selenoid-uri http://<selenoid-host-or-ip>:4444

2. Features list:

2.1. Stats and sessions

Shows current quota usage, pending browsers and queue. Gets updates via SSE, so no need to refresh browser to see what happens. It will reconnect automatically on any temp failures.

Stats and sessions

ui

2.2. Capabilities

You can choose browser from the available browser list and UI will provide an example of setup with right capabilities. Examples available for several languages.

Capabilities

ui

2.3. LOGS & VNC

If you get browser from selenoid with enableVNC=true capability, you can see list of available at stats page. Notice VNC badge.

VNC allows to see and interact with browser while log will reflect all driver actions:

Exact VNC session

ui

Pay attention to named sessions - you can achieve same result with name=your.test.name capability.

Fullscreen mode

ui

Please refer to selenoid documentation about VNC usage.

2.3.1. LOGS

You can see logs of docker container for each session even without vnc and name (no any additional action required)

Logs

logs

3. Contributing & Development

1) Ensure you have yarn and go-bindata-assetfs installed

  • Get deps with go get -u github.com/golang/dep/cmd/dep && dep ensure

2) Generate static resources:

$ go generate ./web ./...

3) Build:

$ go build

4) To build Docker container type:

$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build
$ docker build -t selenoid-ui:latest .

3.1. Documentation

Locally can be generated with:

$ docker run --rm -v `pwd`/docs/:/documents/      \
    asciidoctor/docker-asciidoctor                \
    asciidoctor -D /documents/output/ index.adoc