@@ -1121,6 +1121,12 @@ docker.up.demo: docker.down.demo
11211121
11221122# Run E2E tests environment in Docker Compose.
11231123#
1124+ # For Chrome WebDriver:
1125+ # `/opt/bin/start-vnc.sh & /opt/bin/start-novnc.sh` could be added after
1126+ # `start-xvfb.sh` script for starting up VNC and web client for it.
1127+ # VNC web client (noVNC) can be accessed on this address:
1128+ # http://localhost:7900/?autoconnect=1&resize=scale&password=secret
1129+ #
11241130# Usage:
11251131# make docker.up.e2e [browser=(chrome|firefox)]
11261132# [rebuild=(no|yes)]
@@ -1148,7 +1154,9 @@ docker-up-e2e-env = RUST_BACKTRACE=1 \
11481154 COMPOSE_WEBDRIVER_ENTRYPOINT=$(strip \
11491155 $(if $(call eq,$(browser ) ,firefox) ,\
11501156 "geckodriver --binary=/opt/firefox/firefox" ,\
1151- "chromedriver --port=4444 --allowed-ips='' --allowed-origins='* '" ) )
1157+ "sh -c \"/opt/bin/start-xvfb.sh 2>/dev/null & \
1158+ exec chromedriver --port=4444 --allowed-ips='' \
1159+ --allowed-origins='* '\"" ) )
11521160
11531161docker.up.e2e : docker.down.e2e
11541162ifeq ($(rebuild ) ,yes)
@@ -1195,6 +1203,12 @@ endif
11951203
11961204# Run dockerized WebDriver.
11971205#
1206+ # For Chrome:
1207+ # `/opt/bin/start-vnc.sh & /opt/bin/start-novnc.sh` could be added after
1208+ # `start-xvfb.sh` script for starting up VNC and web client for it.
1209+ # VNC web client (noVNC) can be accessed on this address:
1210+ # http://localhost:7900/?autoconnect=1&resize=scale&password=secret
1211+ #
11981212# Usage:
11991213# make docker.up.webdriver [browser=(chrome|firefox)]
12001214
@@ -1208,9 +1222,11 @@ ifeq ($(browser),firefox)
12081222 --binary=/opt/firefox/firefox
12091223else
12101224 docker run --rm -d --network=host --shm-size 512m \
1211- --name medea-webdriver-chrome --entrypoint chromedriver \
1225+ --name medea-webdriver-chrome --entrypoint sh \
12121226 selenium/standalone-chrome:$(CHROME_VERSION) \
1213- --port=4444 --allowed-ips='' --allowed-origins='*'
1227+ -c "/opt/bin/start-xvfb.sh 2>/dev/null & \
1228+ exec chromedriver --port=4444 --allowed-ips='' \
1229+ --allowed-origins='*'"
12141230endif
12151231
12161232
0 commit comments