From 4ca28d21a43e1970b0afcfbd8ecad5ff97e3e340 Mon Sep 17 00:00:00 2001
From: kev <vimagick@gmail.com>
Date: Thu, 4 Feb 2016 10:12:14 +0800
Subject: [PATCH] update selenium

---
 selenium/README.md          | 42 +++++++++++++++++++++++++++++++++++--
 selenium/docker-compose.yml |  3 ++-
 2 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/selenium/README.md b/selenium/README.md
index 2a0b74f..2101d94 100644
--- a/selenium/README.md
+++ b/selenium/README.md
@@ -4,21 +4,55 @@ selenium
 [Selenium][1] is an umbrella project for a range of tools and libraries that enable
 and support the automation of web browsers.
 
+Watch [this][2] video to get started.
+
 ## Server
 
 docker-compose.yml
 
-```
+```yaml
 firefox:
-  image: selenium/standalone-firefox
+  image: selenium/standalone-firefox-debug
   ports:
     - "4444:4444"
+    - "5900:5900"
   environment:
     - JAVA_OPTS=-Xmx512m
   restart: always
 ```
 
+docker-compose-grid.yml (not tested yet)
+
+```yaml
+hub:
+  image: selenium/hub
+  container_name: hub
+  ports:
+    - "4444:4444"
+  retart: always
+
+chrome:
+  image: selenium/node-chrome
+  container_name: chrome
+  ports:
+    - "5555"
+  links:
+    - hub
+  retart: always
+
+firefox:
+  image: selenium/node-firefox
+  container_name: firefox
+  ports:
+    - "5555"
+  links:
+    - hub
+  retart: always
 ```
+
+> Access grid console at <http://127.0.0.1:4444/grid/console>
+
+```bash
 $ docker-compose up -d
 ```
 
@@ -80,6 +114,9 @@ driver.quit();
 ```
 
 ```
+# VNC
+$ open vnc://:secret@127.0.0.1:5900
+
 # PYTHON
 $ pip3 install selenium
 $ python3 baidu-search.py
@@ -90,3 +127,4 @@ $ node search-baidu.js
 ```
 
 [1]: http://seleniumhq.org/
+[2]: https://www.youtube.com/watch?v=S4OkrnFb-YY
diff --git a/selenium/docker-compose.yml b/selenium/docker-compose.yml
index b9f4a08..386150d 100644
--- a/selenium/docker-compose.yml
+++ b/selenium/docker-compose.yml
@@ -1,7 +1,8 @@
 firefox:
-  image: selenium/standalone-firefox
+  image: selenium/standalone-firefox-debug
   ports:
     - "4444:4444"
+    - "5900:5900"
   environment:
     - JAVA_OPTS=-Xmx512m
   restart: always