Giter VIP home page Giter VIP logo

seleniumhub's Introduction

Selenium Grid with Docker and WebdriverIO setup

You can use this repo to setup a selenium grid with docker and webdriverIO. This is a work in progress and will be updated as I learn more about webdriverIO and docker. You will need to install docker compose if you don't have it before using the docker-compose.yml which is the easiest way to setup the docker containers after putting the yaml file wherever you want to run it from use the following command:

docker-compose -f docker-compose.yml up

To stop it, hit Ctrl+C

docker-compose -f docker-compose.yml down

These only allow for 1 instance of each nod

Setup in webdriverIO

These are some of the steps to setup webdriverIO with docker service to work with selenium grid. This is a work in progress and will be updated as I learn more about webdriverIO and docker.

Initialize webdriverIO in current directory

npm init wdio .

You can also install webdriverIO and create a new project with

npm init wdio ./path/to/my/project

Install webdriverIO docker service

npm install wdio-docker-service --save-dev

Add docker service to wdio.conf.js

services: ['docker'], // add docker service to services array

Add server options to wdio.conf.js (I think there is another way to do this but this is the way I did it)

hostname: HOSTNAME,
ports: PORT,
path: '/',  // for root path

Add browser options to wdio.conf.js

These are the settings that need to be added to the capabilities:

capabilities: [
    {
        maxInstances: 5,
        browserName: 'chrome',
        'goog:chromeOptions': {
        args: ['--disable-dev-shm-usage']
    }
    },
    {
        maxInstances: 5,
        browserName: 'firefox',
    },
    {
        maxInstances: 5,
        browserName: 'MicrosoftEdge',
    },
  ],

seleniumhub's People

Contributors

jfmckay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.