File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change
1
+ Docker compose support
2
+ ======================
3
+
4
+ Allows to spin up services configured via docker-compose.yml
5
+
6
+ Example docker-compose.yml for grid
7
+ -----------------------------------
8
+
9
+ ::
10
+
11
+ hub:
12
+ image: selenium/hub
13
+ ports:
14
+ - "4444:4444"
15
+ firefox:
16
+ image: selenium/node-firefox
17
+ links:
18
+ - hub
19
+ expose:
20
+ - "5555"
21
+ chrome:
22
+ image: selenium/node-chrome
23
+ links:
24
+ - hub
25
+ expose:
26
+ - "5555"
27
+
28
+ Code
29
+ ----
30
+
31
+ ::
32
+
33
+ compose = DockerCompose("/home/project")
34
+ with compose:
35
+ host = compose.get_service_host("hub", 4444)
36
+ port = compose.get_service_port("hub", 4444)
37
+ driver = webdriver.Remote(
38
+ command_executor=("http://{}:{}/wd/hub".format(host,port)),
39
+ desired_capabilities=CHROME)
40
+ driver.get("http://automation-remarks.com")
41
+
Original file line number Diff line number Diff line change @@ -44,4 +44,4 @@ Usage modes
44
44
Database containers <database >
45
45
Selenium containers <selenium >
46
46
Generic containers <generic >
47
-
47
+ Docker Compose < compose >
You can’t perform that action at this time.
0 commit comments