code for article pfeilbr/webdriverio-playground
Running Selenium Standalone Server (Preferred / lighter weight)
- 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
- Run script
$ node index.js
Running Selenium Hub and Node(s) Using Docker
start hub (clients connect to this)
$ docker run -d -P --name selenium-hub -e GRID_TIMEOUT=10000 selenium/hub
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
Twitter • Reddit