Skip to content

Commit 6849d8b

Browse files
committed
Improving docs for Dynamic Grid
1 parent dd30ba3 commit 6849d8b

File tree

4 files changed

+40
-12
lines changed

4 files changed

+40
-12
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ node_modules/
88
*.swp
99
# Selenium Server Dev
1010
selenium_server_deploy.jar
11+
# assets directory
12+
assets
1113

1214
# Ignoring generated files during the build process
1315
StandaloneC*/selenium.conf

NodeDocker/config.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,21 @@
44
configs = [
55
"selenium/standalone-firefox:4.0.0-beta-2-20210319", "{\"browserName\": \"firefox\"}",
66
"selenium/standalone-chrome:4.0.0-beta-2-20210319", "{\"browserName\": \"chrome\"}",
7-
"selenium/standalone-opera:4.0.0-beta-2-20210319", "{\"browserName\": \"operablink\"}"
8-
]
7+
"selenium/standalone-opera:4.0.0-beta-2-20210319", "{\"browserName\": \"opera\"}",
8+
"selenium/standalone-edge:4.0.0-beta-2-20210319", "{\"browserName\": \"MicrosoftEdge\"}"
9+
]
910

1011
# URL for connecting to the docker daemon
1112
# host.docker.internal works for macOS and Windows.
1213
# Linux could use --net=host in the `docker run` instruction or 172.17.0.1 in the URI below.
1314
# To have Docker listening through tcp on macOS, install socat and run the following command
1415
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
15-
host = "tcp://host.docker.internal:2375"
16+
url = "http://host.docker.internal:2375"
1617
# Docker imagee used for video recording
1718
video-image = "selenium/video:ffmpeg-4.3.1-20210319"
18-
# Absolute path where test assets will be stored (this path must exist on the host)
19-
assets-path = "/assets/path/on/your/host/machine"
20-
# Absolute path where test assets will be stored inside the container
21-
# "/opt/selenium/assets" already exists inside the containers
22-
# If you want to use another one, be sure it exists.
23-
container-assets-path = "/opt/selenium/assets"
2419

2520
# Uncomment the following section if you are running the node on a separate VM
2621
# Fill out the placeholders with appropriate values
2722
#[server]
28-
#hostname = <ip-from-node-machine>
23+
#host = <ip-from-node-machine>
2924
#port = <port-from-node-machine>

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ $ docker stop selenium && docker rm selenium
238238
```
239239
After the containers are stopped and removed, you should see a video file on your machine's `/tmp/videos` directory.
240240

241-
Here is an example using a Hub and 3 Nodes (Chrome, Firefox, and Opera):
241+
Here is an example using a Hub and a few Nodes:
242242

243243
[`docker-compose-v3-video.yml`](docker-compose-v3-video.yml)
244244

@@ -273,7 +273,7 @@ configs = [
273273
# Linux could use --net=host in the `docker run` instruction or 172.17.0.1 in the URI below.
274274
# To have Docker listening through tcp on macOS, install socat and run the following command
275275
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
276-
url = "tcp://host.docker.internal:2375"
276+
url = "http://host.docker.internal:2375"
277277
# Docker imagee used for video recording
278278
video-image = "selenium/video:ffmpeg-4.3.1-20210319"
279279

@@ -321,6 +321,13 @@ docker run --rm -ti --name selenium-docker -p 4444:4444 \
321321

322322
To have the assets saved on your host, please mount your host path to `/opt/selenium/assets`.
323323

324+
### Execution with Docker Compose
325+
326+
Here is an example using a Hub and a Node:
327+
328+
[`docker-compose-v3-dynamic-grid.yml`](docker-compose-v3-dynamic-grid.yml)
329+
330+
324331
### Video recording, screen resolution, and time zones in a Dynamic Grid
325332
To record your WebDriver session, you need to add a `se:options` section to
326333
your capabilities and inside it, configure the desired settings, for example:

docker-compose-v3-dynamic-grid.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-dynamic-grid.yml up`
2+
# Add the `-d` flag at the end for detached execution
3+
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-dynamic-grid.yml down`
4+
version: "3"
5+
services:
6+
node-docker:
7+
image: selenium/node-docker:4.0.0-beta-2-20210319
8+
volumes:
9+
- ./assets:/opt/selenium/assets
10+
- ./NodeDocker/config.toml:/opt/bin/config.toml
11+
depends_on:
12+
- selenium-hub
13+
environment:
14+
- SE_EVENT_BUS_HOST=selenium-hub
15+
- SE_EVENT_BUS_PUBLISH_PORT=4442
16+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
17+
18+
selenium-hub:
19+
image: selenium/hub:4.0.0-beta-2-20210319
20+
container_name: selenium-hub
21+
ports:
22+
- "4442:4442"
23+
- "4443:4443"
24+
- "4444:4444"

0 commit comments

Comments
 (0)