WebdriverIO

Running Selenium Standalone Server (Preferred / lighter weight)

  1. Start selenium Standalone server
# run the following in it's own shell and leave running
$ java -jar selenium-server/selenium-server-standalone-2.53.0.jar
  1. Run script
$ node index.js

Running Selenium Hub and Node(s) Using Docker

  1. start hub (clients connect to this)

     $ docker run -d -P --name selenium-hub -e GRID_TIMEOUT=10000 selenium/hub
    
  2. start chrome node (hub delegates work to it)

     $ docker run -d --link selenium-hub:hub selenium/node-chrome
    

Get host and port for “selenium-hub” container and use them in your client.

Example client config

var options = {
	host: "192.168.99.100",
	port: 32768,
	desiredCapabilities: {
		browserName: 'chrome'
	}
};

see index.js